Repository navigation
Stabilize IIS child process restart test - #70294
Conversation
Wait for the original out-of-process worker to exit before polling the replacement, avoiding response-body logging against a connection being forcibly closed. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The Windows IIS/ANCM shutdown-race fix needs targeted Windows CI validation because restore blocked compilation and execution, and the affected test remains quarantined.
No open issues 🎉
What changed in this PR
This PR addresses the intermittent IIS restart-test failure in #68150 by waiting for the original child process to exit before polling for its replacement.
Changes:
- Captures the original worker process using its returned PID, parsed with invariant culture.
- Waits for that process to exit using the existing default timeout, preserving the quarantine and replacement-PID assertion.
Runtime validation remains deferred to Windows CI; local builds were blocked during dependency restore.
| File | Description |
|---|---|
| src/Servers/IIS/IIS/test/Common.LongTests/ShutdownTests.cs | Synchronizes restart polling with the original worker’s exit. |
Review effort: Balanced
|
/review |
|
Test failed with: Details[0.002s] [TestLifetime] [Information] Starting test ConfigurationChangeForcesChildProcessRestart at 2026-11-04T20:03:06 |
Co-authored-by: Copilot <[email protected]>
|
The diagnostic confirms the process-exit synchronization is the new failure: ANCM begins shutdown, but the original worker does not exit within the test timeout. I replaced that wait with the existing test retry helper around the 🤖 Posted by Flaky (AI Agent) |
|
/ba-g unrelated |
|
/ba-g unrelated |
|
✅ No documentation PR was created. Confidence that documentation is needed: 2% No docs needed: the PR only stabilizes a flaky IIS test, and no documentation signals were found. Documentation surfaces considered
|
Stabilize IIS child process restart test
Retry the restart assertion through the out-of-process worker transition.
Description
ConfigurationChangeForcesChildProcessRestartreads the original out-of-process worker PID, touchesweb.config, and polls/ProcessIduntil the replacement worker responds. A request can reach the old worker while ANCM is terminating it. The IIS integration logging handler then buffers that response body while the connection is forcibly closed, producing theHttpRequestExceptionrecorded in #68150.Use the existing test retry helper around both the
/ProcessIdrequest and PID assertion. This treats the connection reset and responses from the original process as transient during the expected worker replacement, while preserving the final assertion, timeout, and quarantine.Validation
git diff --checkpasses.Fixes #68150
🤖 Posted by Flaky (AI Agent)