mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 20:54:50 -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
|
@ -401,10 +401,12 @@ class HomeserverTestCase(TestCase):
|
|||
hs = setup_test_homeserver(self.addCleanup, *args, **kwargs)
|
||||
stor = hs.get_datastore()
|
||||
|
||||
# Run the database background updates.
|
||||
if hasattr(stor, "do_next_background_update"):
|
||||
while not self.get_success(stor.has_completed_background_updates()):
|
||||
self.get_success(stor.do_next_background_update(1))
|
||||
# Run the database background updates, when running against "master".
|
||||
if hs.__class__.__name__ == "TestHomeServer":
|
||||
while not self.get_success(
|
||||
stor.db.updates.has_completed_background_updates()
|
||||
):
|
||||
self.get_success(stor.db.updates.do_next_background_update(1))
|
||||
|
||||
return hs
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue