diff options
author | Toni Spets <toni.spets@iki.fi> | 2021-08-02 16:24:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-02 13:24:43 +0000 |
commit | ba5287f5e8be150551824493b3ad685dde00a543 (patch) | |
tree | cb8b765fa310c52e4c84a704327b38fe3055891a /tests/utils.py | |
parent | Fix deb build script to set prerelease flag correctly (#10500) (diff) | |
download | synapse-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.py | 3 |
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] |