summary refs log tree commit diff
path: root/tests/unittest.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-12-10 20:08:38 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2021-12-10 20:08:38 +0000
commit30469893aa35992401a02280ca2a41389aa8aa72 (patch)
tree2991f64d5507a7ed78341c6bc8e5fb6f99b91ad5 /tests/unittest.py
parentstore argument is no longer optional in is_interested_in_room (diff)
parentUpdate tests to enable experimental features (diff)
downloadsynapse-github/anoa/e2e_as_internal_testing.tar.xz
Merge branch 'rei/as_device_masquerading_msc3202' of github.com:matrix-org/synapse into anoa/e2e_as_internal_testing github/anoa/e2e_as_internal_testing anoa/e2e_as_internal_testing
Diffstat (limited to 'tests/unittest.py')
-rw-r--r--tests/unittest.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/unittest.py b/tests/unittest.py
index eea0903f05..1431848367 100644
--- a/tests/unittest.py
+++ b/tests/unittest.py
@@ -331,16 +331,13 @@ class HomeserverTestCase(TestCase):
             time.sleep(0.01)
 
     def wait_for_background_updates(self) -> None:
-        """Block until all background database updates have completed.
-
-        Note that callers must ensure there's a store property created on the
-        testcase.
-        """
+        """Block until all background database updates have completed."""
+        store = self.hs.get_datastore()
         while not self.get_success(
-            self.store.db_pool.updates.has_completed_background_updates()
+            store.db_pool.updates.has_completed_background_updates()
         ):
             self.get_success(
-                self.store.db_pool.updates.do_next_background_update(False), by=0.1
+                store.db_pool.updates.do_next_background_update(False), by=0.1
             )
 
     def make_homeserver(self, reactor, clock):