fix: fail fast on silent changed-test hangs

This commit is contained in:
Peter Steinberger
2026-04-23 19:40:16 +01:00
parent e9405318b4
commit e2f2deae78
5 changed files with 94 additions and 14 deletions

View File

@@ -20,6 +20,7 @@ import {
resolveParallelFullSuiteConcurrency,
resolveChangedTargetArgs,
shouldAcquireLocalHeavyCheckLock,
shouldRetryVitestNoOutputTimeout,
writeVitestIncludeFile,
} from "./test-projects.test-support.mjs";
@@ -236,7 +237,7 @@ async function runLoggedVitestSpec(spec) {
console.error(`[test] starting ${spec.config}`);
const startedAt = performance.now();
let result = await runVitestSpec(spec);
if (result.noOutputTimedOut && !spec.watchMode) {
if (result.noOutputTimedOut && !spec.watchMode && shouldRetryVitestNoOutputTimeout(spec.env)) {
console.error(`[test] retrying ${spec.config} after no-output timeout`);
result = await runVitestSpec(spec);
}