Skip to content

Commit a1febe6

Browse files
committed
Force mark remaining tests as crashed after retry loop exits
1 parent 7b7e3dc commit a1febe6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Asynkron.TestRunner/TestRunner.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ private async Task RunWorkerBatchAsync(
184184
var pending = new HashSet<string>(batch);
185185
var running = new HashSet<string>();
186186
var attempts = 0;
187-
const int maxAttempts = 100;
187+
const int maxAttempts = 3; // Reduced from 100 to fail fast
188188

189189
while (pending.Count > 0 && attempts < maxAttempts)
190190
{
@@ -293,6 +293,13 @@ private async Task RunWorkerBatchAsync(
293293
break;
294294
}
295295
}
296+
297+
// After all retries, mark any remaining tests as crashed
298+
foreach (var fqn in pending)
299+
{
300+
lock (results) results.Crashed.Add(fqn);
301+
display.TestCrashed(fqn);
302+
}
296303
}
297304

298305
private async Task RunWithRecoveryQuietAsync(string assemblyPath, List<string> allTests, TestResults results)

0 commit comments

Comments
 (0)