Tie the .NET Framework fixture host to the test host's lifetime - #4032
Merged
Conversation
The PowerShell host used to sleep for a fixed 300 s, so any run in which the process walks got slow (as happened on a starved CI runner) lost the host mid-fixture and failed the remaining tests for the wrong reason. Waiting on the test host's PID makes the fixture independent of wall clock and also guarantees the host disappears with the test host even if the teardown never runs. Assisted-by: Claude:claude-fable-5:Claude Code
christophwille
force-pushed
the
netfx-fixture-host-lifetime
branch
from
August 19, 2026 12:34
bad5ec7 to
4089f11
Compare
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.
Hardening only, no behaviour change in green runs.
NetFrameworkProcessesTestsstarts a Windows PowerShell 5.1 process as the .NET Framework process it inspects. That host used to sleep for a fixed 300 s, which is a wall clock for a slow or starved machine to outrun: on a loaded CI runner the fixture's process walks got slow enough that the host exited mid-fixture and the remaining tests failed for the wrong reason (seen on #3940's Windows jobs). It also left an orphanedpowershell.exewhenever the teardown never ran.Wait-Process -Id <test host PID>ties the host to the test host's lifetime instead: no wall clock to outrun, and the host disappears with the test host even without teardown.Split out of #3940, where it was noted as optional hardening; the process-walk slowness itself is a separate topic (#4012, and the server-GC follow-up PR).
🤖 Generated with Claude Code