From 6a8da434b748b6ffbbaa71607bb059f01a3cf8f1 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Mon, 21 Aug 2023 12:42:52 -0400 Subject: [PATCH 1/2] Do not call setup_background_tasks twice in tests. --- tests/server.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/server.py b/tests/server.py index 481fe34c5caa..ff03d2886476 100644 --- a/tests/server.py +++ b/tests/server.py @@ -1000,8 +1000,6 @@ def setup_test_homeserver( hs.tls_server_context_factory = Mock() hs.setup() - if homeserver_to_use == TestHomeServer: - hs.setup_background_tasks() if isinstance(db_engine, PostgresEngine): database_pool = hs.get_datastores().databases[0] From cb5f5230444f1836b2e40e21405a4ca1cd581c45 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Mon, 21 Aug 2023 12:45:46 -0400 Subject: [PATCH 2/2] Newsfragment --- changelog.d/16150.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/16150.misc diff --git a/changelog.d/16150.misc b/changelog.d/16150.misc new file mode 100644 index 000000000000..97861282fda1 --- /dev/null +++ b/changelog.d/16150.misc @@ -0,0 +1 @@ +Clean-up calling `setup_background_tasks` in unit tests.