[release/11.0] Separate QUIC idle-timeout test setup from inactivity - #134036
Merged
Merged
Conversation
<!-- --> `IdleTimeout_ThrowsQuicException` can expire its one-second connection idle timeout before the initial stream exchange completes, failing during setup rather than reaching its intended assertions. Controlled three-second managed pauses reproduce this premature failure. This change separates successful setup from deliberate inactivity; it does not establish where the delay occurred in the natural CI failures. ### Approach Enable server-only keep-alive during setup, then disable it through the existing MsQuic API table after establishing a pending server read and inbound accept. Keep the original one-second idle setting and all three exact `ConnectionIdle` assertions. Require the setup byte to be received and bound the initial stream operations with cancellation. The test-only helper protects the native handle with `DangerousAddRef`/`DangerousRelease`, preserves the exact private `_handle` field for NativeAOT, and checks native status plus settings readback. Pending operation faults are observed after resource disposal if setup fails. No product API, exception mapping, shared connection helper, global setting or test skip changes. ### Validation - Windows x64 CoreCLR, Schannel, MsQuic 2.5.10: 100 ordinary gated iterations and 12 iterations with three-second pauses across four setup phases passed. All three ungated delayed controls reproduced premature idle failure. - Omitting disable kept operations pending beyond five seconds; disabling keep-alive then allowed all idle assertions to pass. Across 113 gated completions, time from disable/readback to completed assertions was 963-1107 ms. These are managed observation times, not exact native timer measurements. - Native setter failure, cancellation cleanup and closed-handle controls passed. The closed-handle control disposes the stream first because a live stream retains the native connection handle. - Final complete QUIC innerloop plus outerloop suite: 478 passed, 0 failed, 1 existing platform skip. Final focused independent-process repetitions: 20/20 passed. - Final Windows x64 NativeAOT executable: 1/1 passed with each of OpenSSL and Schannel. Native code generation succeeded, but the standard test wrapper failed to resolve the bare executable name (exit 9009); these passes used the generated executable by explicit path. No new broad rooting or warning suppression was added. ### Review considerations This hardens the test against managed setup pauses while native workers remain responsive. The natural CI cause remains unproven, and the gate does not protect against native-worker starvation or sustained packet loss. Setup now uses keep-alive, while the intentional idle phase retains the original timeout semantics. Private-field reflection and mutable native settings add maintenance cost. Linux, Windows x86 and the minimum supported MsQuic 2.2.2 have not been tested; Windows OpenSSL coverage is not Linux coverage. No native leak audit was performed. > [!NOTE] > This PR description and implementation were generated with GitHub Copilot. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @karelz, @dotnet/ncl |
ManickaP
approved these changes
Sep 16, 2026
Member
Member
|
Test only change => tell mode, approved by Karel |
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.
Backport of #133945 to release/11.0
Test-only change to clean up CI