diff options
author | Shay <hillerys@element.io> | 2022-09-28 02:39:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 10:39:03 +0100 |
commit | a2cf66a94d5dfd9d6496ac3e48ec9a22f17be69a (patch) | |
tree | be6567b1d3c8e253df717bddf0a543b147fa39e9 /tests/rest/client | |
parent | Fix `have_seen_event` cache not being invalidated (#13863) (diff) | |
download | synapse-a2cf66a94d5dfd9d6496ac3e48ec9a22f17be69a.tar.xz |
Prepatory work for batching events to send (#13487)
This PR begins work on batching up events during the creation of a room. The PR splits out the creation and sending/persisting of the events. The first three events in the creation of the room-creating the room, joining the creator to the room, and the power levels event are sent sequentially, while the subsequent events are created and collected to be sent at the end of the function. This is currently done by appending them to a list and then iterating over the list to send, the next step (after this PR) would be to send and persist the collected events as a batch.
Diffstat (limited to 'tests/rest/client')
-rw-r--r-- | tests/rest/client/test_rooms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/rest/client/test_rooms.py b/tests/rest/client/test_rooms.py index c7eb88d33f..e281aef779 100644 --- a/tests/rest/client/test_rooms.py +++ b/tests/rest/client/test_rooms.py @@ -710,7 +710,7 @@ class RoomsCreateTestCase(RoomBase): self.assertEqual(HTTPStatus.OK, channel.code, channel.result) self.assertTrue("room_id" in channel.json_body) assert channel.resource_usage is not None - self.assertEqual(44, channel.resource_usage.db_txn_count) + self.assertEqual(35, channel.resource_usage.db_txn_count) def test_post_room_initial_state(self) -> None: # POST with initial_state config key, expect new room id @@ -723,7 +723,7 @@ class RoomsCreateTestCase(RoomBase): self.assertEqual(HTTPStatus.OK, channel.code, channel.result) self.assertTrue("room_id" in channel.json_body) assert channel.resource_usage is not None - self.assertEqual(50, channel.resource_usage.db_txn_count) + self.assertEqual(38, channel.resource_usage.db_txn_count) def test_post_room_visibility_key(self) -> None: # POST with visibility config key, expect new room id |