From 81186c02a6eedeaa60aa3963f13906a4996f8d7a Mon Sep 17 00:00:00 2001 From: Devon Hudson Date: Thu, 7 Nov 2024 15:10:20 -0700 Subject: [PATCH] Limit event fetches to prevent stack size from growing too large --- tests/storage/databases/main/test_events_worker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/storage/databases/main/test_events_worker.py b/tests/storage/databases/main/test_events_worker.py index 104d141a72..7892b49e2c 100644 --- a/tests/storage/databases/main/test_events_worker.py +++ b/tests/storage/databases/main/test_events_worker.py @@ -452,7 +452,9 @@ class DatabaseOutageTestCase(unittest.HomeserverTestCase): with self._outage(): # Kick off a bunch of event fetches but do not pump the reactor event_deferreds = [] - for event_id in self.event_ids: + # Limit the number of event_ids otherwise the total stack size grows too + # large for our custom twisted patch. + for event_id in self.event_ids[0:17]: event_deferreds.append(ensureDeferred(self.store.get_event(event_id))) # We should have maxed out on event fetcher threads