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

[H/3] Fix test closing connection too fast #112691

Merged
merged 2 commits into from
Feb 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
[InlineData(15)]
public async Task LargeSingleHeader_ThrowsException(int maxResponseHeadersLength)
{
var semaphore = new SemaphoreSlim(0);
using HttpClientHandler handler = CreateHttpClientHandler();
handler.MaxResponseHeadersLength = maxResponseHeadersLength;

Expand All @@ -85,6 +86,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
{
Assert.Contains((handler.MaxResponseHeadersLength * 1024).ToString(), e.ToString());
}
await semaphore.WaitAsync();
},
async server =>
{
Expand All @@ -97,6 +99,10 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
#if !WINHTTPHANDLER_TEST
catch (QuicException ex) when (ex.QuicError == QuicError.StreamAborted && ex.ApplicationErrorCode == Http3ExcessiveLoad) {}
#endif
finally
{
semaphore.Release();
}
});
}

Expand Down
Loading