From dbce28b2f14e5a4d0db9f090caf390ea998d1e59 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 30 Jun 2022 15:08:40 +0100 Subject: Fix unread counts on large servers (#13140) --- tests/storage/test_event_push_actions.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/storage/test_event_push_actions.py b/tests/storage/test_event_push_actions.py index ef069a8110..684485ae06 100644 --- a/tests/storage/test_event_push_actions.py +++ b/tests/storage/test_event_push_actions.py @@ -134,15 +134,12 @@ class EventPushActionsStoreTestCase(HomeserverTestCase): last_read_stream_ordering[0] = stream self.get_success( - self.store.db_pool.runInteraction( - "", - self.store._insert_linearized_receipt_txn, + self.store.insert_receipt( room_id, "m.read", - user_id, - f"$test{stream}:example.com", - {}, - stream, + user_id=user_id, + event_ids=[f"$test{stream}:example.com"], + data={}, ) ) @@ -166,6 +163,7 @@ class EventPushActionsStoreTestCase(HomeserverTestCase): _inject_actions(6, PlAIN_NOTIF) _rotate(7) + _assert_counts(1, 0) self.get_success( self.store.db_pool.simple_delete( -- cgit 1.4.1