From 5b9b645400c9c4fdc4054e625930ffa697a271a2 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Thu, 22 Sep 2022 21:51:51 -0500 Subject: [PATCH] Add test description --- tests/storage/databases/main/test_events_worker.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/storage/databases/main/test_events_worker.py b/tests/storage/databases/main/test_events_worker.py index 158ad1f439..47ec189684 100644 --- a/tests/storage/databases/main/test_events_worker.py +++ b/tests/storage/databases/main/test_events_worker.py @@ -103,6 +103,11 @@ class HaveSeenEventsTestCase(unittest.HomeserverTestCase): self.assertEqual(ctx.get_resource_usage().db_txn_count, 0) def test_persisting_event_invalidates_cache(self): + """ + Test to make sure that the `have_seen_event` cache + is invalided after we persist an event and returns + the updated value. + """ event, event_context = self.get_success( create_event( self.hs,