diff options
author | Erik Johnston <erik@matrix.org> | 2020-10-02 15:09:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-02 15:09:31 +0100 |
commit | ec10bdd32bb52af73789f5f60b39135578a739b1 (patch) | |
tree | 48876636f328d91a70d8473d9c2ec38ed52af36c /tests | |
parent | Allow background tasks to be run on a separate worker. (#8369) (diff) | |
download | synapse-ec10bdd32bb52af73789f5f60b39135578a739b1.tar.xz |
Speed up unit tests when using PostgreSQL (#8450)
Diffstat (limited to '')
-rw-r--r-- | tests/server.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/server.py b/tests/server.py index b404ad4e2a..f7f5276b21 100644 --- a/tests/server.py +++ b/tests/server.py @@ -372,6 +372,10 @@ def setup_test_homeserver(cleanup_func, *args, **kwargs): pool.threadpool = ThreadPool(clock._reactor) pool.running = True + # We've just changed the Databases to run DB transactions on the same + # thread, so we need to disable the dedicated thread behaviour. + server.get_datastores().main.USE_DEDICATED_DB_THREADS_FOR_EVENT_FETCHING = False + return server |