create two batches per process in clickhouse-test

This commit is contained in:
Alexander Kuzmenkov 2021-03-30 14:03:00 +03:00
parent 58987a973d
commit 27635fd381

View File

@ -788,7 +788,8 @@ def main(args):
if jobs > run_total:
run_total = jobs
batch_size = len(parallel_tests) // jobs
# Create two batches per process for more uniform execution time.
batch_size = max(1, len(parallel_tests) // (jobs * 2))
parallel_tests_array = []
for i in range(0, len(parallel_tests), batch_size):
parallel_tests_array.append((parallel_tests[i:i+batch_size], suite, suite_dir, suite_tmp_dir))