From a78c66e3d64fe3e8a4f5351fa353012a9634013e Mon Sep 17 00:00:00 2001 From: Alexander Nikolaev Date: Tue, 13 Jul 2021 16:40:49 +0200 Subject: [PATCH 1/2] Enable Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_ConcurrentRequestsSuccessfullyHandled --- .../FunctionalTests/SocketsHttpHandlerTest.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs index d8b7ec4e712cd..4ac61a22f3071 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs @@ -2077,10 +2077,11 @@ public sealed class SocketsHttpHandlerTest_Http2 : HttpClientHandlerTest_Http2 { public SocketsHttpHandlerTest_Http2(ITestOutputHelper output) : base(output) { } - [ConditionalFact(nameof(SupportsAlpn))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/41078")] - public async Task Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_ConcurrentRequestsSuccessfullyHandled() + [ConditionalTheory(nameof(SupportsAlpn))] + [MemberData(nameof(ManyIterations))] + public async Task Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_ConcurrentRequestsSuccessfullyHandled(int m) { + Assert.True(m > -1); const int MaxConcurrentStreams = 2; using Http2LoopbackServer server = Http2LoopbackServer.CreateServer(); using SocketsHttpHandler handler = CreateHandler(); @@ -2211,6 +2212,14 @@ public async Task Http2_MultipleConnectionsEnabled_OpenAndCloseMultipleConnectio } } + public static IEnumerable ManyIterations() + { + for (var i = 0; i < 1000; i++) + { + yield return new object[] {i}; + } + } + [ConditionalFact(nameof(SupportsAlpn))] [OuterLoop("Incurs long delay")] [ActiveIssue("https://github.com/dotnet/runtime/issues/43877")] From 7994395277bef3f0c11cd4b785e0502892a0b3b0 Mon Sep 17 00:00:00 2001 From: Alexander Nikolaev <55398552+alnikola@users.noreply.github.com> Date: Tue, 13 Jul 2021 19:49:03 +0200 Subject: [PATCH 2/2] Update SocketsHttpHandlerTest.cs --- .../FunctionalTests/SocketsHttpHandlerTest.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs index 4ac61a22f3071..772bddebde54a 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs @@ -2077,11 +2077,9 @@ public sealed class SocketsHttpHandlerTest_Http2 : HttpClientHandlerTest_Http2 { public SocketsHttpHandlerTest_Http2(ITestOutputHelper output) : base(output) { } - [ConditionalTheory(nameof(SupportsAlpn))] - [MemberData(nameof(ManyIterations))] - public async Task Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_ConcurrentRequestsSuccessfullyHandled(int m) + [ConditionalFact(nameof(SupportsAlpn))] + public async Task Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_ConcurrentRequestsSuccessfullyHandled() { - Assert.True(m > -1); const int MaxConcurrentStreams = 2; using Http2LoopbackServer server = Http2LoopbackServer.CreateServer(); using SocketsHttpHandler handler = CreateHandler(); @@ -2212,14 +2210,6 @@ public async Task Http2_MultipleConnectionsEnabled_OpenAndCloseMultipleConnectio } } - public static IEnumerable ManyIterations() - { - for (var i = 0; i < 1000; i++) - { - yield return new object[] {i}; - } - } - [ConditionalFact(nameof(SupportsAlpn))] [OuterLoop("Incurs long delay")] [ActiveIssue("https://github.com/dotnet/runtime/issues/43877")]