Skip to content

Commit

Permalink
Increase multiple HTTP/2 connections test timeouts again (dotnet#40464)
Browse files Browse the repository at this point in the history
  • Loading branch information
alnikola committed Aug 7, 2020
1 parent ebc57b9 commit 5ca480e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ public async Task Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_
Assert.True(connection1.IsInvalid);
Assert.False(connection0.IsInvalid);

Http2LoopbackConnection connection2 = await PrepareConnection(server, client, MaxConcurrentStreams, readTimeout: 7, expectedWarpUpTasks:2).ConfigureAwait(false);
Http2LoopbackConnection connection2 = await PrepareConnection(server, client, MaxConcurrentStreams, readTimeout: 15, expectedWarpUpTasks:2).ConfigureAwait(false);

AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams);

Expand Down Expand Up @@ -2204,13 +2204,13 @@ private async Task VerifySendTasks(IReadOnlyList<Task<HttpResponseMessage>> send
private async Task<Http2LoopbackConnection> PrepareConnection(Http2LoopbackServer server, HttpClient client, uint maxConcurrentStreams, int readTimeout = 3, int expectedWarpUpTasks = 1)
{
Task<HttpResponseMessage> warmUpTask = client.GetAsync(server.Address);
Http2LoopbackConnection connection = await GetConnection(server, maxConcurrentStreams, readTimeout).TimeoutAfter(TestHelper.PassingTestTimeoutMilliseconds).ConfigureAwait(false);
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);
await Task.WhenAll(warmUpTask, handleRequestTask).TimeoutAfter(TestHelper.PassingTestTimeoutMilliseconds).ConfigureAwait(false);
await Task.WhenAll(warmUpTask, handleRequestTask).TimeoutAfter(TestHelper.PassingTestTimeoutMilliseconds * 2).ConfigureAwait(false);
Assert.True(warmUpTask.Result.IsSuccessStatusCode);
warmUpTask.Result.Dispose();
if (settingAckReceived.IsCompleted)
Expand Down

0 comments on commit 5ca480e

Please sign in to comment.