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().pull/16151/head
parent
7dbac123f9
commit
6d7c63fcc6
|
@ -0,0 +1 @@
|
||||||
|
Clean-up calling `setup_background_tasks` in unit tests.
|
|
@ -1000,8 +1000,6 @@ def setup_test_homeserver(
|
||||||
hs.tls_server_context_factory = Mock()
|
hs.tls_server_context_factory = Mock()
|
||||||
|
|
||||||
hs.setup()
|
hs.setup()
|
||||||
if homeserver_to_use == TestHomeServer:
|
|
||||||
hs.setup_background_tasks()
|
|
||||||
|
|
||||||
if isinstance(db_engine, PostgresEngine):
|
if isinstance(db_engine, PostgresEngine):
|
||||||
database_pool = hs.get_datastores().databases[0]
|
database_pool = hs.get_datastores().databases[0]
|
||||||
|
|
Loading…
Reference in New Issue