Fix flaky Kill_Test on macOS by waiting for process exit before asserting#117
Fix flaky Kill_Test on macOS by waiting for process exit before asserting#117
Kill_Test on macOS by waiting for process exit before asserting#117Conversation
…xited Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/8eb94b3f-07a5-467b-bd65-c50c6b172da0 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes an intermittent macOS test failure in ProcessTests.Kill_Test by ensuring the killed process has fully exited before asserting HasExited, aligning the test with how Process.Kill() can return before the OS reaps the process.
Changes:
- Added
process.WaitForExit()afterprocess.Kill(true)inKill_Testto reduce flakiness on macOS.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## prime #117 +/- ##
==========================================
+ Coverage 90.77% 90.82% +0.04%
==========================================
Files 284 284
Lines 4934 4935 +1
Branches 404 404
==========================================
+ Hits 4479 4482 +3
+ Misses 365 363 -2
Partials 90 90 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot build/test failing |
…(TimeSpan) (net6.0 compat) Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/80c57795-1f5b-4b25-a4db-1c8fd7a3cff2 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
|
@copilot I've added the TimeSpan polyfill in the latest |
ProcessTests.Kill_Testwas intermittently failing on macOS becauseProcess.Kill()sends SIGKILL and returns before the OS reaps the process — makingHasExitedtransientlyfalse.Change
Added
process.WaitForExit()between theKill(true)call and theHasExitedassertion, ensuring the process is fully terminated before the check: