summary refs log tree commit diff
path: root/tests/rest/client/sliding_sync/test_extensions.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@element.io>2024-08-19 21:16:07 +0100
committerGitHub <noreply@github.com>2024-08-19 21:16:07 +0100
commit8b8d74d12f29a9b58c367715d7b8234e39a5eb1a (patch)
tree267b695c5e4b09c9263b24731c3f62803207bdff /tests/rest/client/sliding_sync/test_extensions.py
parentSliding sync: Add classes for per-connection state (#17574) (diff)
downloadsynapse-8b8d74d12f29a9b58c367715d7b8234e39a5eb1a.tar.xz
Sliding sync: Correctly track which read receipts we have or have not sent down. (#17575)
Add connection tracking to the receipts extension.

Based on #17574

---------

Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
Diffstat (limited to 'tests/rest/client/sliding_sync/test_extensions.py')
-rw-r--r--tests/rest/client/sliding_sync/test_extensions.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/rest/client/sliding_sync/test_extensions.py b/tests/rest/client/sliding_sync/test_extensions.py

index 68f6661334..ae823d5415 100644 --- a/tests/rest/client/sliding_sync/test_extensions.py +++ b/tests/rest/client/sliding_sync/test_extensions.py
@@ -120,19 +120,26 @@ class SlidingSyncExtensionsTestCase(SlidingSyncBase): "foo-list": { "ranges": [[0, 1]], "required_state": [], - "timeline_limit": 0, + # We set this to `1` because we're testing `receipts` which + # interact with the `timeline`. With receipts, when a room + # hasn't been sent down the connection before or it appears + # as `initial: true`, we only include receipts for events in + # the timeline to avoid bloating and blowing up the sync + # response as the number of users in the room increases. + # (this behavior is part of the spec) + "timeline_limit": 1, }, # We expect this list range to include room5, room4, room3 "bar-list": { "ranges": [[0, 2]], "required_state": [], - "timeline_limit": 0, + "timeline_limit": 1, }, }, "room_subscriptions": { room_id1: { "required_state": [], - "timeline_limit": 0, + "timeline_limit": 1, } }, }