0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-01 18:28:56 +02:00

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().
This commit is contained in:
Patrick Cloke 2023-08-22 07:46:32 -04:00 committed by GitHub
parent 7dbac123f9
commit 6d7c63fcc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

1
changelog.d/16150.misc Normal file
View file

@ -0,0 +1 @@
Clean-up calling `setup_background_tasks` in unit tests.

View file

@ -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]