Fix flaky output truncation in CLI integration tests - #10384
Merged
Conversation
StreamForwarder read the child process's redirected output on a thread-pool thread (Task.Run) one character at a time. Under CI load the thread pool can be starved, delaying the reader so the OS pipe fills and the child blocks on Console.Write. The child's asynchronous console logger (AddSimpleConsole) then drops queued messages when its bounded flush-on-dispose (~1.5s) times out, truncating captured output and producing cut-off Verify received.txt files. Read on a dedicated long-running thread and in 4096-char chunks so the pipe is drained promptly and the child is never blocked long enough to lose output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a88c2700-ee2f-4a55-9272-f19d9b8537d7
Member
|
wow, what a find |
baronfel
approved these changes
Jul 23, 2026
joeloff
enabled auto-merge (squash)
July 23, 2026 21:26
Member
Author
|
/backport to release/10.0.3xx |
|
Started backporting to |
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.
StreamForwarder read the child process's redirected output on a thread-pool thread (Task.Run) one character at a time. Under CI load the thread pool can be starved, delaying the reader so the OS pipe fills and the child blocks on Console.Write. The child's asynchronous console logger (AddSimpleConsole) then drops queued messages when its bounded flush-on-dispose (~1.5s) times out, truncating captured output and producing cut-off Verify received.txt files.
Read on a dedicated long-running thread and in 4096-char chunks so the pipe is drained promptly and the child is never blocked long enough to lose output.