perf(test-bucket): only serialize slow bucket, parallelize fast

Reviewer noted `--max-concurrency=1` was applied to both buckets. Slow
bucket needs it (subprocesses, ports, shared state → flaky in parallel)
but fast bucket was unnecessarily capped. Remove the flag for fast;
keep for slow.

Verified: test:fast still green (2510 pass, 14.4s locally).
This commit is contained in:
Tam Nhu Tran
2026-04-22 16:42:45 -04:00
parent eab2b48f2c
commit 6b5c74aa4b
+12 -9
View File
@@ -125,15 +125,18 @@ function runBucket(name) {
}
}
const result = spawnSync(
'bun',
['test', '--max-concurrency=1', ...selected],
{
cwd: rootDir,
stdio: 'inherit',
shell: process.platform === 'win32',
},
);
// Slow bucket forces sequential execution because it spawns subprocesses,
// binds ports, and touches shared state — parallelism causes flakes.
// Fast bucket keeps bun's default parallelism for speed.
const bunArgs = name === 'slow'
? ['test', '--max-concurrency=1', ...selected]
: ['test', ...selected];
const result = spawnSync('bun', bunArgs, {
cwd: rootDir,
stdio: 'inherit',
shell: process.platform === 'win32',
});
return result.status ?? 1;
}