-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[H/3] Fix response header tests for H/3 #117495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Tagging subscribers to this area: @dotnet/ncl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates two HTTP/3 header length tests to synchronize client and server shutdowns using CountdownEvent
instead of SemaphoreSlim
, preventing premature connection closure and test flakiness.
- Replace
SemaphoreSlim
withCountdownEvent(2)
for two-party coordination. - Signal and wait on the countdown event in both client and server callbacks.
- Apply a timeout to the wait to avoid indefinite blocking.
Comments suppressed due to low confidence (1)
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs:76
- [nitpick] The variable name
ce
is abbreviated and may be unclear to readers. Consider renaming it tocountdownEvent
for clarity.
var ce = new CountdownEvent(2);
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs
Show resolved
Hide resolved
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs
Outdated
Show resolved
Hide resolved
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
This time server was the one closing the connection while the client is still waiting on stream abort:
So wait with connection disposal on both sides.
Fixes #117484