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:
parent
a077776d2f
commit
773af06b5a
|
@ -91,7 +91,7 @@ def tests(session):
|
||||||
session.install('-e', '.')
|
session.install('-e', '.')
|
||||||
session.run_always('tools/yarn-build.sh', external=True)
|
session.run_always('tools/yarn-build.sh', external=True)
|
||||||
session.run_always('zuul-manage-ansible', '-v')
|
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.run('stestr', 'run', '--slowest', f'--concurrency={procs}',
|
||||||
*session.posargs)
|
*session.posargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue