diff options
Diffstat (limited to 'tests/push/test_email.py')
-rw-r--r-- | tests/push/test_email.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/push/test_email.py b/tests/push/test_email.py index f8cba7b645..90f800e564 100644 --- a/tests/push/test_email.py +++ b/tests/push/test_email.py @@ -128,7 +128,6 @@ class EmailPusherTests(HomeserverTestCase): ) self.auth_handler = hs.get_auth_handler() - self.store = hs.get_datastore() def test_need_validated_email(self): """Test that we can only add an email pusher if the user has validated @@ -409,7 +408,13 @@ class EmailPusherTests(HomeserverTestCase): self.hs.get_datastore().db_pool.updates._all_done = False # Now let's actually drive the updates to completion - self.wait_for_background_updates() + while not self.get_success( + self.hs.get_datastore().db_pool.updates.has_completed_background_updates() + ): + self.get_success( + self.hs.get_datastore().db_pool.updates.do_next_background_update(100), + by=0.1, + ) # Check that all pushers with unlinked addresses were deleted pushers = self.get_success( |