Skip to content
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

[HTTP/3] Reenabled ReadAsStreamAsync_HandlerProducesWellBehavedResponseStream #58041

Merged
merged 1 commit into from
Aug 30, 2021

Conversation

ManickaP
Copy link
Member

Fixes #53087

I ran 10_000 tight loops locally without an issue.

@ghost
Copy link

ghost commented Aug 24, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #53087

I ran 10_000 tight loops locally without an issue.

Author: ManickaP
Assignees: -
Labels:

area-System.Net.Http

Milestone: -


if (connection is Http3LoopbackConnection http3Connection)
{
await http3Connection.WaitForClientDisconnectAsync();
Copy link
Member

@CarnaViire CarnaViire Aug 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering if it's the same kind of a workaround we would have to add to other tests for #57779?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should just add this to the HTTP3 version of AcceptConnectionAsync.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's the same workaround.

I tried to add it into AcceptConnectionAsync to make it more generic/future proof, but it caused timeouts in cancellation tests, so I scoped it to this particular test.

Side note: I think that the reason was that they dispose client one level higher then the server. Thus, the client connection is never closed before server needs to finish. Leading me to a conclusion that adding some generic solution might not be possible or at least won't be easy 😢

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha @geoffkizer I didn't notice your comment before posting mine. I tried that, it cause timeouts elsewhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's only a handful of cancellation tests that failed, it might make more sense to update those tests to work with this than to update all the other tests to call WaitForClientDisconnectAsync.

Cancellation tests are tricky anyway; I'd rather be modifying them to be more robust than modifying a bunch of more straightforward tests...

Do you remember which cancellation tests failed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have to retry. I think that the number of test instances was high but that it was just 2 or 3 test methods repeated for different inputs.
So do not merge on my behalf, I'll retry tomorrow and either try to fix those or report back how much of them it was.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to actually initiate server shutdown here by sending a GOAWAY, then call WaitForClientDisconnectAsync. This is probably better behavior, but more involved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I posted a PR to do the graceful shutdown in AcceptConnectionAsync -- #58088. Feedback welcome.

We should discuss if we want to take that PR or not.

Copy link
Member

@CarnaViire CarnaViire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ManickaP ManickaP force-pushed the mapichov/53087_reenable_test branch from 8f464b7 to 55a6f47 Compare August 27, 2021 17:08
@ManickaP ManickaP merged commit d70fa8f into dotnet:main Aug 30, 2021
@ManickaP ManickaP deleted the mapichov/53087_reenable_test branch August 30, 2021 11:56
@karelz karelz added this to the 7.0.0 milestone Aug 31, 2021
ManickaP added a commit that referenced this pull request Sep 2, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HTTP/3] ReadAsStreamAsync_HandlerProducesWellBehavedResponseStream test fails
4 participants