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

Commit

Permalink
Properly call setup_background_tasks in unit tests. (#16150)
Browse files Browse the repository at this point in the history
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().
  • Loading branch information
clokep authored Aug 22, 2023
1 parent 7dbac12 commit 6d7c63f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/16150.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clean-up calling `setup_background_tasks` in unit tests.
2 changes: 0 additions & 2 deletions tests/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 6d7c63f

Please sign in to comment.