diff options
author | Olivier Wilkinson (reivilibre) <oliverw@matrix.org> | 2021-12-14 14:22:01 +0000 |
---|---|---|
committer | Olivier Wilkinson (reivilibre) <oliverw@matrix.org> | 2021-12-14 14:22:01 +0000 |
commit | 4dd9ea8f4fc002f35fa604361a792ea1d3d6671c (patch) | |
tree | 1690b0d4658301b51907afeacf9e46bda7ce1152 /tests/unittest.py | |
parent | Revert accidental fast-forward merge from v1.49.0rc1 (diff) | |
download | synapse-4dd9ea8f4fc002f35fa604361a792ea1d3d6671c.tar.xz |
Revert "Revert accidental fast-forward merge from v1.49.0rc1"
This reverts commit 158d73ebdd61eef33831ae5f6990acf07244fc55.
Diffstat (limited to 'tests/unittest.py')
-rw-r--r-- | tests/unittest.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/unittest.py b/tests/unittest.py index 165aafc574..eea0903f05 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -331,17 +331,16 @@ class HomeserverTestCase(TestCase): time.sleep(0.01) def wait_for_background_updates(self) -> None: - """ - Block until all background database updates have completed. + """Block until all background database updates have completed. - Note that callers must ensure that's a store property created on the + Note that callers must ensure there's a store property created on the testcase. """ 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.store.db_pool.updates.do_next_background_update(False), by=0.1 ) def make_homeserver(self, reactor, clock): @@ -500,8 +499,7 @@ class HomeserverTestCase(TestCase): async def run_bg_updates(): with LoggingContext("run_bg_updates"): - while not await stor.db_pool.updates.has_completed_background_updates(): - await stor.db_pool.updates.do_next_background_update(1) + self.get_success(stor.db_pool.updates.run_background_updates(False)) hs = setup_test_homeserver(self.addCleanup, *args, **kwargs) stor = hs.get_datastore() |