diff options
author | Erik Johnston <erik@matrix.org> | 2019-12-04 15:09:36 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-12-05 11:11:26 +0000 |
commit | 4a33a6dd19590b8e6626a5af5a69507dc11236f8 (patch) | |
tree | 4d4f1f826a93afbd47e50562949a0e2f51ddb827 /tests/storage/test_cleanup_extrems.py | |
parent | Comments (diff) | |
download | synapse-4a33a6dd19590b8e6626a5af5a69507dc11236f8.tar.xz |
Move background update handling out of store
Diffstat (limited to 'tests/storage/test_cleanup_extrems.py')
-rw-r--r-- | tests/storage/test_cleanup_extrems.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/storage/test_cleanup_extrems.py b/tests/storage/test_cleanup_extrems.py index e454bbff29..029ac26454 100644 --- a/tests/storage/test_cleanup_extrems.py +++ b/tests/storage/test_cleanup_extrems.py @@ -46,7 +46,9 @@ class CleanupExtremBackgroundUpdateStoreTestCase(HomeserverTestCase): """Re run the background update to clean up the extremities. """ # Make sure we don't clash with in progress updates. - self.assertTrue(self.store._all_done, "Background updates are still ongoing") + self.assertTrue( + self.store.db.updates._all_done, "Background updates are still ongoing" + ) schema_path = os.path.join( prepare_database.dir_path, @@ -68,10 +70,14 @@ class CleanupExtremBackgroundUpdateStoreTestCase(HomeserverTestCase): ) # Ugh, have to reset this flag - self.store._all_done = False + self.store.db.updates._all_done = False - while not self.get_success(self.store.has_completed_background_updates()): - self.get_success(self.store.do_next_background_update(100), by=0.1) + while not self.get_success( + self.store.db.updates.has_completed_background_updates() + ): + self.get_success( + self.store.db.updates.do_next_background_update(100), by=0.1 + ) def test_soft_failed_extremities_handled_correctly(self): """Test that extremities are correctly calculated in the presence of |