Skip to content

Commit 06569f4

Browse files
committed
Reduce parallel test batch size
1 parent 087b3a1 commit 06569f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

run-tests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,10 +1633,10 @@ function run_all_tests_parallel(array $test_files, array $env, ?string $redir_te
16331633
// - If this is running a small enough number of tests,
16341634
// reduce the batch size to give batches to more workers.
16351635
$files = [];
1636-
$maxBatchSize = $valgrind ? 1 : ($shuffle ? 4 : 32);
1636+
$maxBatchSize = $valgrind ? 1 : 4;
16371637
$averageFilesPerWorker = max(1, (int) ceil($totalFileCount / count($workerProcs)));
16381638
$batchSize = min($maxBatchSize, $averageFilesPerWorker);
1639-
while (count($files) <= $batchSize && $file = array_pop($test_files)) {
1639+
while (count($files) < $batchSize && $file = array_pop($test_files)) {
16401640
foreach ($fileConflictsWith[$file] as $conflictKey) {
16411641
if (isset($activeConflicts[$conflictKey])) {
16421642
$waitingTests[$conflictKey][] = $file;

0 commit comments

Comments
 (0)