From: Alexander Nikolaev <55398552+alnikola@users.noreply.github.com> Date: Fri, 7 Aug 2020 15:19:33 +0000 (+0200) Subject: Increase multiple HTTP/2 connections test timeouts again (#40464) X-Git-Tag: submit/tizen/20210909.063632~6156 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ca480ea678ad2ea6c9abe54e32ce80a3970782a;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Increase multiple HTTP/2 connections test timeouts again (#40464) Fixes #40115 Fixes #40436 --- diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs index f096461..71c9e27 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs @@ -2167,7 +2167,7 @@ namespace System.Net.Http.Functional.Tests 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); @@ -2204,13 +2204,13 @@ namespace System.Net.Http.Functional.Tests private async Task PrepareConnection(Http2LoopbackServer server, HttpClient client, uint maxConcurrentStreams, int readTimeout = 3, int expectedWarpUpTasks = 1) { Task 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)