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

Change SendAsync_SlowServerRespondsAfterDefaultReceiveTimeout_ThrowsHttpRequestException server to Loopback #93025

Merged

Conversation

liveans
Copy link
Member

@liveans liveans commented Oct 4, 2023

Fixes #20675

@ghost
Copy link

ghost commented Oct 4, 2023

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

Issue Details

Fixes #20675

Author: liveans
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@liveans liveans requested a review from a team October 4, 2023 19:14
Copy link
Member

@rzikm rzikm left a comment

Choose a reason for hiding this comment

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

LGTM

{
Task serverTask = server.AcceptConnectionAsync(async connection =>
{
await connection.SendResponseAsync($"HTTP/1.1 200 OK\r\nDate: {DateTimeOffset.UtcNow:R}\r\nContent-Length: 16000\r\n\r\n");
Copy link
Member

Choose a reason for hiding this comment

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

You're postponing the timeout to the response body portion of HTTP exchange, right? If so, HttpClient.GetAsync will succeed as it by default reads only response headers and doesn't wait for the body.

Copy link
Member

Choose a reason for hiding this comment

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

HttpClient.GetAsync will succeed as it by default reads only response headers and doesn't wait for the body

HttpClient.GetAsync is passing HttpCompletionOption.ResponseContentRead to HttpClient.SendAsync which should enforce reading and buffering the response body. Or am I missing something?

@ManickaP
Copy link
Member

ManickaP commented Oct 5, 2023

Also the affected test is outerloop, so you need to trigger the run manually with /azp run ...

@liveans
Copy link
Member Author

liveans commented Oct 5, 2023

/azp list

@azure-pipelines
Copy link

CI/CD Pipelines for this repository:

@liveans
Copy link
Member Author

liveans commented Oct 5, 2023

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liveans
Copy link
Member Author

liveans commented Oct 5, 2023

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liveans
Copy link
Member Author

liveans commented Oct 6, 2023

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liveans
Copy link
Member Author

liveans commented Oct 6, 2023

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liveans
Copy link
Member Author

liveans commented Oct 6, 2023

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liveans liveans merged commit b21d709 into dotnet:main Oct 7, 2023
174 checks passed
@liveans liveans deleted the sendasync_responds_after_recv_timeout_fix branch October 7, 2023 07:16
@karelz karelz added this to the 9.0.0 milestone Oct 11, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Nov 10, 2023
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.

Test failure: SendAsync_SlowServerRespondsAfterDefaultReceiveTimeout_ThrowsHttpRequestException
5 participants