mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 16:44:49 -04:00
fix race condiftion in calling initialise_reserved_users
This commit is contained in:
parent
7aea00069c
commit
6105c6101f
5 changed files with 55 additions and 27 deletions
|
@ -52,7 +52,10 @@ class MonthlyActiveUsersTestCase(HomeserverTestCase):
|
|||
now = int(self.hs.get_clock().time_msec())
|
||||
self.store.user_add_threepid(user1, "email", user1_email, now, now)
|
||||
self.store.user_add_threepid(user2, "email", user2_email, now, now)
|
||||
self.store.initialise_reserved_users(threepids)
|
||||
|
||||
self.store.runInteraction(
|
||||
"initialise", self.store.initialise_reserved_users, threepids
|
||||
)
|
||||
self.pump()
|
||||
|
||||
active_count = self.store.get_monthly_active_count()
|
||||
|
@ -199,7 +202,10 @@ class MonthlyActiveUsersTestCase(HomeserverTestCase):
|
|||
{'medium': 'email', 'address': user2_email},
|
||||
]
|
||||
self.hs.config.mau_limits_reserved_threepids = threepids
|
||||
self.store.initialise_reserved_users(threepids)
|
||||
self.store.runInteraction(
|
||||
"initialise", self.store.initialise_reserved_users, threepids
|
||||
)
|
||||
|
||||
self.pump()
|
||||
count = self.store.get_registered_reserved_users_count()
|
||||
self.assertEquals(self.get_success(count), 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue