Repository navigation
Feed the stall-watch test from a thread of its own - #794
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
StallWatchTests.A_program_that_keeps_reporting_runs_well_past_the_stall_limitfailed 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:
Thread.Sleep(50), like the real output reader, so pool load can't delay the touches.TaskCompletionSourceruns its continuations asynchronously, so the test never continues on, and joins, the output thread itself.Test only; no product code changes.
Type of change
How was it tested?
dotnet test tests/Filee.Engines.Tests --filter StallWatchTests: 10 passed🤖 Generated with Claude Code