Skip to content

Commit

Permalink
Disabled test, fixed some typos as well. (#45212)
Browse files Browse the repository at this point in the history
  • Loading branch information
ManickaP authored Nov 25, 2020
1 parent 854fde6 commit ffc141a
Showing 1 changed file with 5 additions and 4 deletions.
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);
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

0 comments on commit ffc141a

Please sign in to comment.