Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 6d7c63f

Browse files
authored
Properly call setup_background_tasks in unit tests. (#16150)
This should only be called on HomeServer objects which are configured to run background tasks, which is automatically (and properly) done via the call to setup().
1 parent 7dbac12 commit 6d7c63f

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

changelog.d/16150.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clean-up calling `setup_background_tasks` in unit tests.

tests/server.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,8 +1000,6 @@ def setup_test_homeserver(
10001000
hs.tls_server_context_factory = Mock()
10011001

10021002
hs.setup()
1003-
if homeserver_to_use == TestHomeServer:
1004-
hs.setup_background_tasks()
10051003

10061004
if isinstance(db_engine, PostgresEngine):
10071005
database_pool = hs.get_datastores().databases[0]

0 commit comments

Comments
 (0)