mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 04:18:05 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user