diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2020-06-12 11:28:26 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2020-06-12 11:28:26 +0100 |
commit | 6b1fa3293d5e834b6b66c4b9d83a5f938cbcabde (patch) | |
tree | 758036dc41a5a0ac62d22c8bca247d5320f96858 /tests/replication/slave/storage | |
parent | Remove debug logging (diff) | |
download | synapse-6b1fa3293d5e834b6b66c4b9d83a5f938cbcabde.tar.xz |
Test that a mark_unread action updates the right counter when using a slave store
Diffstat (limited to 'tests/replication/slave/storage')
-rw-r--r-- | tests/replication/slave/storage/test_events.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/replication/slave/storage/test_events.py b/tests/replication/slave/storage/test_events.py index bc667454c1..9837d44995 100644 --- a/tests/replication/slave/storage/test_events.py +++ b/tests/replication/slave/storage/test_events.py @@ -191,6 +191,21 @@ class SlavedEventStoreTestCase(BaseSlavedStoreTestCase): {"highlight_count": 1, "notify_count": 2, "unread_count": 2}, ) + self.persist( + type="m.room.message", + msgtype="m.text", + body="world", + push_actions=[ + (USER_ID_2, ["org.matrix.msc2625.mark_unread"]) + ], + ) + self.replicate() + self.check( + "get_unread_event_push_actions_by_room_for_user", + [ROOM_ID, USER_ID_2, event1.event_id], + {"highlight_count": 1, "notify_count": 2, "unread_count": 3}, + ) + def test_get_rooms_for_user_with_stream_ordering(self): """Check that the cache on get_rooms_for_user_with_stream_ordering is invalidated by rows in the events stream |