From edf9ef0b1351ec34667e3e73628ab522b29f4ad7 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Mon, 13 Oct 2025 15:25:09 -0500 Subject: [PATCH] Comment about slight naivety --- tests/unittest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unittest.py b/tests/unittest.py index 5186e66c31..76bd1fb6ab 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -704,6 +704,11 @@ class HomeserverTestCase(TestCase): start_time_s = time.time() store = hs.get_datastores().main while not self.get_success( + # This check is slightly naive. It only checks if there is anything left in + # the `background_updates` database table so it is possible that the + # homeserver mistakenly never registered any background updates to be run. + # Since `register_background_xxx(...)` is done across the codebase, we can't + # really assert that everything was registered as expected. store.db_pool.updates.has_completed_background_updates() ): # Timeout if it takes too long. This should be pretty immediate as we're