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

Disabled Http2_MultipleConnectionsEnabled_InfiniteRequestsCompletelyBlockOneConnection_RemaningRequestsAreHandledByNewConnection #45212

Merged
merged 1 commit into from
Nov 25, 2020
Merged
Changes from all commits
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 @@ -2073,6 +2073,7 @@ public async Task Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_Con
}

[ConditionalFact(nameof(SupportsAlpn))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/45204")]
public async Task Http2_MultipleConnectionsEnabled_InfiniteRequestsCompletelyBlockOneConnection_RemaningRequestsAreHandledByNewConnection()
{
const int MaxConcurrentStreams = 2;
Expand All @@ -2096,7 +2097,7 @@ public async Task Http2_MultipleConnectionsEnabled_InfiniteRequestsCompletelyBlo

Assert.Equal(MaxConcurrentStreams, handledRequestCount);

//Complete inifinite requests.
// Complete infinite requests.
handledRequestCount = await SendResponses(connection0, blockedStreamIds);

Assert.Equal(MaxConcurrentStreams, handledRequestCount);
Expand Down Expand Up @@ -2209,7 +2210,7 @@ public async Task Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_
Assert.True(connection1.IsInvalid);
Assert.False(connection0.IsInvalid);

Http2LoopbackConnection connection2 = await PrepareConnection(server, client, MaxConcurrentStreams, readTimeout: 15, expectedWarpUpTasks:2).ConfigureAwait(false);
stephentoub marked this conversation as resolved.
Show resolved Hide resolved
Http2LoopbackConnection connection2 = await PrepareConnection(server, client, MaxConcurrentStreams, readTimeout: 15, expectedWarmUpTasks:2).ConfigureAwait(false);

AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams);

Expand Down Expand Up @@ -2243,15 +2244,15 @@ private async Task VerifySendTasks(IReadOnlyList<Task<HttpResponseMessage>> send
SslOptions = { RemoteCertificateValidationCallback = delegate { return true; } }
};

private async Task<Http2LoopbackConnection> PrepareConnection(Http2LoopbackServer server, HttpClient client, uint maxConcurrentStreams, int readTimeout = 3, int expectedWarpUpTasks = 1)
private async Task<Http2LoopbackConnection> PrepareConnection(Http2LoopbackServer server, HttpClient client, uint maxConcurrentStreams, int readTimeout = 3, int expectedWarmUpTasks = 1)
{
Task<HttpResponseMessage> warmUpTask = client.GetAsync(server.Address);
Http2LoopbackConnection connection = await GetConnection(server, maxConcurrentStreams, readTimeout).TimeoutAfter(TestHelper.PassingTestTimeoutMilliseconds * 2).ConfigureAwait(false);
// Wait until the client confirms MaxConcurrentStreams setting took into effect.
Task settingAckReceived = connection.SettingAckWaiter;
while (true)
{
Task handleRequestTask = HandleAllPendingRequests(connection, expectedWarpUpTasks);
Task handleRequestTask = HandleAllPendingRequests(connection, expectedWarmUpTasks);
await Task.WhenAll(warmUpTask, handleRequestTask).TimeoutAfter(TestHelper.PassingTestTimeoutMilliseconds * 2).ConfigureAwait(false);
Assert.True(warmUpTask.Result.IsSuccessStatusCode);
warmUpTask.Result.Dispose();
Expand Down