diff options
author | Erik Johnston <erik@matrix.org> | 2022-06-06 11:24:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-06 09:24:12 +0100 |
commit | e3163e2e11cf8bffa4cb3e58ac0b86a83eca314c (patch) | |
tree | 639271e4b4d4157b95047f801f6b22bf39a24f08 /tests/storage/test_room.py | |
parent | Remove groups code from synapse_port_db. (#12899) (diff) | |
download | synapse-e3163e2e11cf8bffa4cb3e58ac0b86a83eca314c.tar.xz |
Reduce the amount of state we pull from the DB (#12811)
Diffstat (limited to 'tests/storage/test_room.py')
-rw-r--r-- | tests/storage/test_room.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/storage/test_room.py b/tests/storage/test_room.py index d497a19f63..3c79dabc9f 100644 --- a/tests/storage/test_room.py +++ b/tests/storage/test_room.py @@ -72,7 +72,7 @@ class RoomEventsStoreTestCase(HomeserverTestCase): # Room events need the full datastore, for persist_event() and # get_room_state() self.store = hs.get_datastores().main - self._storage = hs.get_storage_controllers() + self._storage_controllers = hs.get_storage_controllers() self.event_factory = hs.get_event_factory() self.room = RoomID.from_string("!abcde:test") @@ -88,7 +88,7 @@ class RoomEventsStoreTestCase(HomeserverTestCase): def inject_room_event(self, **kwargs): self.get_success( - self._storage.persistence.persist_event( + self._storage_controllers.persistence.persist_event( self.event_factory.create_event(room_id=self.room.to_string(), **kwargs) ) ) @@ -101,7 +101,9 @@ class RoomEventsStoreTestCase(HomeserverTestCase): ) state = self.get_success( - self.store.get_current_state(room_id=self.room.to_string()) + self._storage_controllers.state.get_current_state( + room_id=self.room.to_string() + ) ) self.assertEqual(1, len(state)) @@ -118,7 +120,9 @@ class RoomEventsStoreTestCase(HomeserverTestCase): ) state = self.get_success( - self.store.get_current_state(room_id=self.room.to_string()) + self._storage_controllers.state.get_current_state( + room_id=self.room.to_string() + ) ) self.assertEqual(1, len(state)) |