diff options
author | Erik Johnston <erik@matrix.org> | 2020-08-05 21:38:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-05 21:38:57 +0100 |
commit | a7bdf98d01d2225a479753a85ba81adf02b16a32 (patch) | |
tree | 11443d9f4d89d9cd33d34d4146fd62e6393a87c6 /tests/storage/test_background_update.py | |
parent | Stop the parent process flushing the logs on exit (#8012) (diff) | |
download | synapse-a7bdf98d01d2225a479753a85ba81adf02b16a32.tar.xz |
Rename database classes to make some sense (#8033)
Diffstat (limited to 'tests/storage/test_background_update.py')
-rw-r--r-- | tests/storage/test_background_update.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/storage/test_background_update.py b/tests/storage/test_background_update.py index 940b166129..2efbc97c2e 100644 --- a/tests/storage/test_background_update.py +++ b/tests/storage/test_background_update.py @@ -9,7 +9,9 @@ from tests import unittest class BackgroundUpdateTestCase(unittest.HomeserverTestCase): def prepare(self, reactor, clock, homeserver): - self.updates = self.hs.get_datastore().db.updates # type: BackgroundUpdater + self.updates = ( + self.hs.get_datastore().db_pool.updates + ) # type: BackgroundUpdater # the base test class should have run the real bg updates for us self.assertTrue( self.get_success(self.updates.has_completed_background_updates()) @@ -29,7 +31,7 @@ class BackgroundUpdateTestCase(unittest.HomeserverTestCase): store = self.hs.get_datastore() self.get_success( - store.db.simple_insert( + store.db_pool.simple_insert( "background_updates", values={"update_name": "test_update", "progress_json": '{"my_key": 1}'}, ) @@ -40,7 +42,7 @@ class BackgroundUpdateTestCase(unittest.HomeserverTestCase): def update(progress, count): yield self.clock.sleep((count * duration_ms) / 1000) progress = {"my_key": progress["my_key"] + 1} - yield store.db.runInteraction( + yield store.db_pool.runInteraction( "update_progress", self.updates._background_update_progress_txn, "test_update", |