mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:44:49 -04:00
Move background update handling out of store
This commit is contained in:
parent
8863624f78
commit
4a33a6dd19
27 changed files with 281 additions and 200 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue