mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 05:34:56 -04:00
Replace instances of reactor pumping with get_success. (#7619)
Calls `self.get_success` on all deferred methods instead of abusing `self.pump()`. This has the benefit of working with coroutines, as well as checking that method execution completed successfully. There are also a few small cleanups that I made in the process.
This commit is contained in:
parent
c9507be989
commit
0188daf32c
3 changed files with 152 additions and 121 deletions
|
@ -85,7 +85,7 @@ class TestMauLimit(unittest.HomeserverTestCase):
|
|||
# Advance time by 31 days
|
||||
self.reactor.advance(31 * 24 * 60 * 60)
|
||||
|
||||
self.store.reap_monthly_active_users()
|
||||
self.get_success(self.store.reap_monthly_active_users())
|
||||
|
||||
self.reactor.advance(0)
|
||||
|
||||
|
@ -147,8 +147,7 @@ class TestMauLimit(unittest.HomeserverTestCase):
|
|||
|
||||
# Advance by 2 months so everyone falls out of MAU
|
||||
self.reactor.advance(60 * 24 * 60 * 60)
|
||||
self.store.reap_monthly_active_users()
|
||||
self.reactor.advance(0)
|
||||
self.get_success(self.store.reap_monthly_active_users())
|
||||
|
||||
# We can create as many new users as we want
|
||||
token4 = self.create_user("kermit4")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue