-
Couldn't load subscription status.
- Fork 5.2k
make Http2_RequestFailsWithAppropriateHttpProtocolException test more deterministic #94112
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
…ocolException test more deterministic
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsWhen I look at the normal passing run I see something like
when it fails, the exchange looks like So it seems like if the GOAWAY is sent before the client even start making request the test fails with This may (or may not) be caused by the connection pool refactor. Since the requests are now detached, the connection can be closed by the 'GOAWAY` and the request does not fail with protocol error. To minimize risk, I only changed the test to wait for beginning of the request to arrive so when fixes #92647
|
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.
LGTM
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs
Outdated
Show resolved
Hide resolved
|
enterprised-linux failures are unrelated. looks like infrastructure problem. |
|
/backport to release/8.0-staging |
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/17242678894 |


When I look at the normal passing run I see something like
when it fails, the exchange looks like

So it seems like if the GOAWAY is sent before the client even start making request the test fails with
Couldn't find HttpProtocolException with matching error code in exception: System.Net.Http.HttpRequestException: An HTTP/2 connection could not be established because the server did not complete the HTTP/2 handshake.This may (or may not) be caused by the connection pool refactor. Since the requests are now detached, the connection can be closed by the 'GOAWAY` and the request does not fail with protocol error.
To minimize risk, I only changed the test to wait for beginning of the request to arrive so when
HttpClientprocess the response it would produce deterministic result. I was running tests in loop with this change and I did not see failure. It was failing for me before frequently with less than 20-50 iterations.fixes #92647