From bf452c39e4b2f604aa20cd5c7ee99b5659375984 Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Sun, 1 Oct 2023 08:52:51 +0200 Subject: [PATCH] tempest: Make concurrency configurable with a sane default. Tempest will by default run with a concurrency matching the number of cores on the test runner. When running on a workstation, it is likely that the default concurrency will be too high for the scale of deployed workload. Signed-off-by: Frode Nordahl --- zaza/openstack/charm_tests/tempest/tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zaza/openstack/charm_tests/tempest/tests.py b/zaza/openstack/charm_tests/tempest/tests.py index 6e21a2796..8f1405729 100644 --- a/zaza/openstack/charm_tests/tempest/tests.py +++ b/zaza/openstack/charm_tests/tempest/tests.py @@ -69,6 +69,16 @@ def run(self): tempest_options.extend( ['--exclude-regex', ' '.join([reg for reg in config.get('exclude-regex')])]) + # Tempest will by default run with a concurrency matching the + # number of cores on the test runner. + # + # When running on a workstation, it is likely that the default + # concurrency will be too high for the scale of deployed workload. + # + # Make concurrency configurable with a sane default. + tempest_options.extend( + ['--concurrency', + str(config.get('concurrency', min(os.cpu_count(), 4)))]) with tempfile.TemporaryDirectory() as tmpdirname: if config.get('include-list'): include_file = os.path.join(tmpdirname, 'include.cfg')