Skip to content

Stop emit verb tests from hanging on Linux/Mac CI agents#2943

Merged
michaelcfanning merged 1 commit into
mainfrom
hotfix/test-hang-mac-linux
May 26, 2026
Merged

Stop emit verb tests from hanging on Linux/Mac CI agents#2943
michaelcfanning merged 1 commit into
mainfrom
hotfix/test-hang-mac-linux

Conversation

@michaelcfanning
Copy link
Copy Markdown
Member

Two tests left InputFilePath null to exercise the empty-payload diagnostic via Console.OpenStandardInput().ReadToEnd(). That returns empty under xUnit on Windows but blocks indefinitely on the ADO Linux/Mac agents — their stdin pipe stays open without EOF. The release pipeline on main hung exactly there after #2942 merged: Test.UnitTests.Sarif.dll finished, Test.UnitTests.Sarif.Multitool.Library.dll never returned.

Repoint both tests at an empty input file: TryReadJsonPayload's file branch hits the same "<Kind> JSON is empty" diagnostic, assertions unchanged, stdin path never touched.

Production users are unaffected — interactive shells report IsInputRedirected = false, piped shells send EOF cleanly. Test-environment artifact only.

Two tests left InputFilePath null (or omitted) to exercise the empty-payload

diagnostic, trusting that Console.OpenStandardInput().ReadToEnd() returns an

empty string on every platform when xUnit redirects stdin. That holds on

Windows but not on the ADO Linux/Mac agents: the runner's stdin pipe stays

open without ever sending EOF, so ReadToEnd() blocks and the test assembly

hangs. The ADO release pipeline observed exactly this on main after PR #2942

merged - Test.UnitTests.Sarif.dll finished, then the multitool assembly never

returned.

Repoint both tests at an empty input file. TryReadJsonPayload's file branch

reads the file, finds the JSON empty, and emits the same 'is empty' diagnostic

the stdin branch would have - so the assertion is unchanged - and the stdin

code path is never touched, making the test portable across agents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@michaelcfanning michaelcfanning requested a review from cfaucon as a code owner May 26, 2026 19:36
@michaelcfanning michaelcfanning enabled auto-merge (squash) May 26, 2026 19:36
@michaelcfanning michaelcfanning merged commit 6eff758 into main May 26, 2026
6 checks passed
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.

2 participants