Reduce unit test concurrency

This reduces the unit test concurrency to 75% of available cpus.
This appears to reduce the chances of racy test failures while
increasing the job runtime in opendev from 50m to 1h.

Change-Id: I90a22dbe8d28fc35d609f8dbc63305b501c544e6
This commit is contained in:
James E. Blair 2024-02-15 16:18:51 -08:00
parent a077776d2f
commit 773af06b5a
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ def tests(session):
session.install('-e', '.')
session.run_always('tools/yarn-build.sh', external=True)
session.run_always('zuul-manage-ansible', '-v')
procs = max(int(multiprocessing.cpu_count() - 1), 1)
procs = max(int(multiprocessing.cpu_count() * 0.75), 1)
session.run('stestr', 'run', '--slowest', f'--concurrency={procs}',
*session.posargs)