summary refs log tree commit diff
path: root/tests/handlers/test_stats.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2021-10-12 10:21:26 +0100
committerBrendan Abolivier <babolivier@matrix.org>2021-10-12 10:21:26 +0100
commit6ce0dc0620228ab24749abc1e7d7efaad6e3f88a (patch)
tree3bd832712dfe139b18075bc2f072948203e6e201 /tests/handlers/test_stats.py
parentMerge branch 'release-v1.44' into matrix-org-hotfixes (diff)
parentdisallow-untyped-defs for synapse.push (#11023) (diff)
downloadsynapse-6ce0dc0620228ab24749abc1e7d7efaad6e3f88a.tar.xz
Merge branch 'release-v1.45' into matrix-org-hotfixes
Diffstat (limited to 'tests/handlers/test_stats.py')
-rw-r--r--tests/handlers/test_stats.py21
1 files changed, 3 insertions, 18 deletions
diff --git a/tests/handlers/test_stats.py b/tests/handlers/test_stats.py

index 24b7ef6efc..56207f4db6 100644 --- a/tests/handlers/test_stats.py +++ b/tests/handlers/test_stats.py
@@ -103,12 +103,7 @@ class StatsRoomTests(unittest.HomeserverTestCase): # Do the initial population of the stats via the background update self._add_background_updates() - while not self.get_success( - self.store.db_pool.updates.has_completed_background_updates() - ): - self.get_success( - self.store.db_pool.updates.do_next_background_update(100), by=0.1 - ) + self.wait_for_background_updates() def test_initial_room(self): """ @@ -140,12 +135,7 @@ class StatsRoomTests(unittest.HomeserverTestCase): # Do the initial population of the user directory via the background update self._add_background_updates() - while not self.get_success( - self.store.db_pool.updates.has_completed_background_updates() - ): - self.get_success( - self.store.db_pool.updates.do_next_background_update(100), by=0.1 - ) + self.wait_for_background_updates() r = self.get_success(self.get_all_room_state()) @@ -568,12 +558,7 @@ class StatsRoomTests(unittest.HomeserverTestCase): ) ) - while not self.get_success( - self.store.db_pool.updates.has_completed_background_updates() - ): - self.get_success( - self.store.db_pool.updates.do_next_background_update(100), by=0.1 - ) + self.wait_for_background_updates() r1stats_complete = self._get_current_stats("room", r1) u1stats_complete = self._get_current_stats("user", u1)