Skip to content

Feed the stall-watch test from a thread of its own - #794

Merged
KnifeLemon merged 2 commits into
mainfrom
fix/stallwatch-test-thread
Oct 30, 2026
Merged

KnifeLemon merged 2 commits into
mainfrom
fix/stallwatch-test-thread

Conversation

@KnifeLemon

Copy link
Copy Markdown
Owner

What does this change?

StallWatchTests.A_program_that_keeps_reporting_runs_well_past_the_stall_limit failed on CI again, in #790's run, after #768 widened its limit to 1 s.

Cause: the fake program's output was a Task.Delay(50) loop on the thread pool. The other test classes run in parallel and can keep the pool busy for over a second, so the watch saw no line for longer than the limit and reported a stall.

Fix:

  • The output now comes from a dedicated thread with Thread.Sleep(50), like the real output reader, so pool load can't delay the touches.
  • The exit TaskCompletionSource runs its continuations asynchronously, so the test never continues on, and joins, the output thread itself.

Test only; no product code changes.

Type of change

  • Build, CI or dependencies (test stability)

How was it tested?

  • dotnet test tests/Filee.Engines.Tests --filter StallWatchTests: 10 passed

🤖 Generated with Claude Code

KnifeLemon and others added 2 commits October 30, 2026 15:24
A_program_that_keeps_reporting_runs_well_past_the_stall_limit still failed
on CI after #768 (#790's run): its fake output was a Task.Delay loop, which
waits for the thread pool, and the other test classes running in parallel
can hold that up for over a second, so the watch saw a stall. The output
now comes from a dedicated thread, like the real output reader, and the
test's continuation runs asynchronously so it never joins its own thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon
KnifeLemon merged commit dc3515c into main Oct 30, 2026
8 checks passed
@KnifeLemon
KnifeLemon deleted the fix/stallwatch-test-thread branch October 30, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant