Commit d12d1259 authored by Jérome Perrin's avatar Jérome Perrin

erp5: take test databases into account of default max-connection-count [WIP]

Also stop generating test databases when test runner is not enabled.
parent 1b7541a4
...@@ -78,7 +78,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e ...@@ -78,7 +78,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = ff5e0d8d1ca167399fb438e890baf370 md5sum = f6cae0ac548c6d86944b1570a6466694
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
{% set test_runner_total_database_count = mariadb_test_database_amount %} {% set test_runner_total_database_count = mariadb_test_database_amount %}
{% set test_runner_enabled = mariadb_test_database_amount > 0 %} {% set test_runner_enabled = mariadb_test_database_amount > 0 %}
{% endif -%} {% endif -%}
{% if not test_runner_enabled -%}
{% set test_runner_total_database_count = 0 %}
{% endif -%}
{% set monitor_base_url_dict = {} -%} {% set monitor_base_url_dict = {} -%}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %} {% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%} {% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
...@@ -115,7 +118,7 @@ backup-caucased = ${:srv}/backup/caucased ...@@ -115,7 +118,7 @@ backup-caucased = ${:srv}/backup/caucased
'max-slowqueries-threshold': monitor_dict.get('max-slowqueries-threshold', 1000), 'max-slowqueries-threshold': monitor_dict.get('max-slowqueries-threshold', 1000),
'slowest-query-threshold': monitor_dict.get('slowest-query-threshold', ''), 'slowest-query-threshold': monitor_dict.get('slowest-query-threshold', ''),
'test-database-amount': test_runner_total_database_count, 'test-database-amount': test_runner_total_database_count,
'max-connection-count': sum(partition_thread_count_list) * 5 + 50, 'max-connection-count': (sum(partition_thread_count_list) + test_runner_total_database_count) * 5 + 50,
}, },
{ {
'database-list': True, 'database-list': True,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment