summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-10-02 15:09:31 +0100
committerGitHub <noreply@github.com>2020-10-02 15:09:31 +0100
commitec10bdd32bb52af73789f5f60b39135578a739b1 (patch)
tree48876636f328d91a70d8473d9c2ec38ed52af36c /tests
parentAllow background tasks to be run on a separate worker. (#8369) (diff)
downloadsynapse-ec10bdd32bb52af73789f5f60b39135578a739b1.tar.xz
Speed up unit tests when using PostgreSQL (#8450)
Diffstat (limited to 'tests')
-rw-r--r--tests/server.py4
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