diff options
author | Neil Johnson <neil@matrix.org> | 2018-10-23 15:24:58 +0100 |
---|---|---|
committer | Neil Johnson <neil@matrix.org> | 2018-10-23 15:24:58 +0100 |
commit | 6105c6101fa0f4560daf7d23dedcfd217530b02a (patch) | |
tree | c4b2318ccdbb3993391ceb580b84f9ed8635441d /tests | |
parent | Merge pull request #4076 from matrix-org/rav/fix_init_logcontexts (diff) | |
download | synapse-6105c6101fa0f4560daf7d23dedcfd217530b02a.tar.xz |
fix race condiftion in calling initialise_reserved_users
Diffstat (limited to 'tests')
-rw-r--r-- | tests/storage/test_monthly_active_users.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/storage/test_monthly_active_users.py b/tests/storage/test_monthly_active_users.py index 686f12a0dc..0c17745ae7 100644 --- a/tests/storage/test_monthly_active_users.py +++ b/tests/storage/test_monthly_active_users.py @@ -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) |