summary refs log tree commit diff
path: root/tests/server.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@element.io>2024-08-13 17:59:47 +0100
committerGitHub <noreply@github.com>2024-08-13 17:59:47 +0100
commita9fc1fd112162a50e361768788523c46d2655dc7 (patch)
tree5fe2f9615032120cfe916e8a839892474d53e679 /tests/server.py
parentAdd a utility function for generating fake event IDs (#17557) (diff)
downloadsynapse-a9fc1fd112162a50e361768788523c46d2655dc7.tar.xz
Use a larger, dedicated threadpool for media sending (#17564)
Diffstat (limited to '')
-rw-r--r--tests/server.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/server.py b/tests/server.py

index 3e377585ce..95aff6f66c 100644 --- a/tests/server.py +++ b/tests/server.py
@@ -1166,6 +1166,12 @@ def setup_test_homeserver( hs.get_auth_handler().validate_hash = validate_hash # type: ignore[assignment] + # We need to replace the media threadpool with the fake test threadpool. + def thread_pool() -> threadpool.ThreadPool: + return reactor.getThreadPool() + + hs.get_media_sender_thread_pool = thread_pool # type: ignore[method-assign] + # Load any configured modules into the homeserver module_api = hs.get_module_api() for module, module_config in hs.config.modules.loaded_modules: