summary refs log tree commit diff
path: root/tests/utils.py
diff options
context:
space:
mode:
authorToni Spets <toni.spets@iki.fi>2021-08-02 16:24:43 +0300
committerGitHub <noreply@github.com>2021-08-02 13:24:43 +0000
commitba5287f5e8be150551824493b3ad685dde00a543 (patch)
treecb8b765fa310c52e4c84a704327b38fe3055891a /tests/utils.py
parentFix deb build script to set prerelease flag correctly (#10500) (diff)
downloadsynapse-ba5287f5e8be150551824493b3ad685dde00a543.tar.xz
Allow setting transaction limit for db connections (#10440)
Setting the value will help PostgreSQL free up memory by recycling
the connections in the connection pool.

Signed-off-by: Toni Spets <toni.spets@iki.fi>
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 6bd008dcfe..f3458ca88d 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -239,6 +239,9 @@ def setup_test_homeserver(
             "args": {"database": ":memory:", "cp_min": 1, "cp_max": 1},
         }
 
+    if "db_txn_limit" in kwargs:
+        database_config["txn_limit"] = kwargs["db_txn_limit"]
+
     database = DatabaseConnectionConfig("master", database_config)
     config.database.databases = [database]