From 6ce050de02e1561642fe45314164aac7a32d79a1 Mon Sep 17 00:00:00 2001 From: KnifeLemon Date: Thu, 29 Oct 2026 21:57:10 +0900 Subject: [PATCH] Give the stall-watch progress test room on busy CI runners A_program_that_keeps_reporting_runs_well_past_the_stall_limit touched every 50 ms against a 300 ms limit and failed several times today when a loaded runner delayed one wait past 300 ms (#759, #765, #766). The limit is now 1 s and the fake program reports for 3 s, still three times the limit. Co-Authored-By: Claude Opus 5.5 --- tests/Filee.Engines.Tests/StallWatchTests.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/Filee.Engines.Tests/StallWatchTests.cs b/tests/Filee.Engines.Tests/StallWatchTests.cs index 6eaee9536..d35ffa7b5 100644 --- a/tests/Filee.Engines.Tests/StallWatchTests.cs +++ b/tests/Filee.Engines.Tests/StallWatchTests.cs @@ -16,14 +16,15 @@ public sealed class StallWatchTests public async Task A_program_that_keeps_reporting_runs_well_past_the_stall_limit() { var token = TestContext.Current.CancellationToken; - var watch = new StallWatch(TimeSpan.FromMilliseconds(300)); + // A limit far above the 50 ms between lines: a busy CI runner can delay a 50 ms wait by a few hundred ms. + var watch = new StallWatch(TimeSpan.FromSeconds(1)); var exited = new TaskCompletionSource(); var started = Stopwatch.StartNew(); - // "34% Running transforms on e-book..." every 50 ms for a second, three times the limit. + // "34% Running transforms on e-book..." every 50 ms for three seconds, three times the limit. var output = Task.Run(async () => { - while (started.Elapsed < TimeSpan.FromSeconds(1)) + while (started.Elapsed < TimeSpan.FromSeconds(3)) { watch.Touch(); await Task.Delay(50, token); @@ -32,7 +33,7 @@ public async Task A_program_that_keeps_reporting_runs_well_past_the_stall_limit( }, token); Assert.True(await watch.WaitAsync(exited.Task, token, Interval)); - Assert.True(started.Elapsed >= TimeSpan.FromSeconds(1)); + Assert.True(started.Elapsed >= TimeSpan.FromSeconds(3)); await output; }