Skip to content

Commit 3c96cb8

Browse files
authored
Enable parallel test execution for QUIC and HTTP/3 and enable some disabled http3 tests (#102996)
* Revert "Disable parallel test execution for QUIC and HTTP/3 (#101569)" This reverts commit 009d74e. * Revert "Disable frequently failing tests (#101439)" This reverts commit e01db17. * Delete whitespace * Style changes
1 parent db5e98d commit 3c96cb8

File tree

6 files changed

+7
-50
lines changed

6 files changed

+7
-50
lines changed

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cookies.cs

+2-7
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private static CookieContainer CreateSingleCookieContainer(Uri uri, string cooki
4444
private static string GetCookieHeaderValue(string cookieName, string cookieValue) => $"{cookieName}={cookieValue}";
4545

4646
[Fact]
47-
public virtual async Task GetAsync_DefaultCoookieContainer_NoCookieSent()
47+
public async Task GetAsync_DefaultCoookieContainer_NoCookieSent()
4848
{
4949
await LoopbackServerFactory.CreateClientAndServerAsync(
5050
async uri =>
@@ -216,15 +216,10 @@ private string GetCookieValue(HttpRequestData request)
216216
return cookieHeaderValue;
217217
}
218218

219-
[ConditionalFact]
219+
[Fact]
220220
[SkipOnPlatform(TestPlatforms.Browser, "CookieContainer is not supported on Browser")]
221221
public async Task GetAsync_SetCookieContainerAndCookieHeader_BothCookiesSent()
222222
{
223-
if (UseVersion == HttpVersion30)
224-
{
225-
throw new SkipTestException("https://github.com/dotnet/runtime/issues/101377");
226-
}
227-
228223
await LoopbackServerFactory.CreateServerAsync(async (server, url) =>
229224
{
230225
HttpClientHandler handler = CreateHttpClientHandler();

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ await connection.WriteStringAsync(
988988
});
989989
}
990990

991-
[ConditionalTheory]
991+
[Theory]
992992
[InlineData(true, true, true)]
993993
[InlineData(true, true, false)]
994994
[InlineData(true, false, false)]
@@ -998,11 +998,6 @@ await connection.WriteStringAsync(
998998
[ActiveIssue("https://github.com/dotnet/runtime/issues/65429", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))]
999999
public async Task ReadAsStreamAsync_HandlerProducesWellBehavedResponseStream(bool? chunked, bool enableWasmStreaming, bool slowChunks)
10001000
{
1001-
if (UseVersion == HttpVersion30)
1002-
{
1003-
throw new SkipTestException("https://github.com/dotnet/runtime/issues/91757");
1004-
}
1005-
10061001
if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value)
10071002
{
10081003
return;

src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AltSvc.cs

+2-14
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
using System.Net.Test.Common;
99
using System.Net.Quic;
1010

11-
using Microsoft.DotNet.XUnitExtensions;
12-
1311
namespace System.Net.Http.Functional.Tests
1412
{
1513
public abstract class HttpClientHandler_AltSvc_Test : HttpClientHandlerTestBase
@@ -29,15 +27,10 @@ private HttpClient CreateHttpClient(Version version)
2927
return client;
3028
}
3129

32-
[ConditionalTheory]
30+
[Theory]
3331
[MemberData(nameof(AltSvcHeaderUpgradeVersions))]
3432
public async Task AltSvc_Header_Upgrade_Success(Version fromVersion, bool overrideHost)
3533
{
36-
if (UseVersion == HttpVersion30 && fromVersion == HttpVersion.Version11 && overrideHost)
37-
{
38-
throw new SkipTestException("https://github.com/dotnet/runtime/issues/91757");
39-
}
40-
4134
// The test makes a request to a HTTP/1 or HTTP/2 server first, which supplies an Alt-Svc header pointing to the second server.
4235
using GenericLoopbackServer firstServer =
4336
fromVersion.Major switch
@@ -78,14 +71,9 @@ public async Task AltSvc_Header_Upgrade_Success(Version fromVersion, bool overri
7871
{ HttpVersion.Version20, false }
7972
};
8073

81-
[ConditionalFact]
74+
[Fact]
8275
public async Task AltSvc_ConnectionFrame_UpgradeFrom20_Success()
8376
{
84-
if (UseVersion == HttpVersion30)
85-
{
86-
throw new SkipTestException("https://github.com/dotnet/runtime/issues/101376");
87-
}
88-
8977
using Http2LoopbackServer firstServer = Http2LoopbackServer.CreateServer();
9078
using Http3LoopbackServer secondServer = CreateHttp3LoopbackServer();
9179
using HttpClient client = CreateHttpClient(HttpVersion.Version20);

src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs

+1-8
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
using Xunit;
1414
using Xunit.Abstractions;
1515

16-
using Microsoft.DotNet.XUnitExtensions;
17-
1816
namespace System.Net.Http.Functional.Tests
1917
{
2018
using Configuration = System.Net.Test.Common.Configuration;
@@ -289,17 +287,12 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
289287
});
290288
}
291289

292-
[ConditionalTheory]
290+
[Theory]
293291
[InlineData("Thu, 01 Dec 1994 16:00:00 GMT", true)]
294292
[InlineData("-1", false)]
295293
[InlineData("0", false)]
296294
public async Task SendAsync_Expires_Success(string value, bool isValid)
297295
{
298-
if (UseVersion == HttpVersion30)
299-
{
300-
throw new SkipTestException("https://github.com/dotnet/runtime/issues/91757");
301-
}
302-
303296
await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
304297
{
305298
using (HttpClient client = CreateHttpClient())

src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs

-14
Original file line numberDiff line numberDiff line change
@@ -1633,7 +1633,6 @@ public SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http2(ITest
16331633
protected override Version UseVersion => HttpVersion.Version20;
16341634
}
16351635

1636-
[Collection(nameof(DisableParallelization))]
16371636
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
16381637
[ActiveIssue("https://github.com/dotnet/runtime/issues/91757")]
16391638
[ActiveIssue("https://github.com/dotnet/runtime/issues/101015")]
@@ -4028,51 +4027,41 @@ public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http2(ITestOutputH
40284027
protected override Version UseVersion => HttpVersion.Version20;
40294028
}
40304029

4031-
[Collection(nameof(DisableParallelization))]
40324030
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40334031
public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Http3 : HttpClientHandlerTest
40344032
{
40354033
public SocketsHttpHandlerTest_HttpClientHandlerTest_Http3(ITestOutputHelper output) : base(output) { }
40364034
protected override Version UseVersion => HttpVersion.Version30;
40374035
}
40384036

4039-
[Collection(nameof(DisableParallelization))]
40404037
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40414038
public sealed class SocketsHttpHandlerTest_Cookies_Http3 : HttpClientHandlerTest_Cookies
40424039
{
40434040
public SocketsHttpHandlerTest_Cookies_Http3(ITestOutputHelper output) : base(output) { }
40444041
protected override Version UseVersion => HttpVersion.Version30;
4045-
4046-
[Fact]
4047-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91757")]
4048-
public override Task GetAsync_DefaultCoookieContainer_NoCookieSent() { return null!; }
40494042
}
40504043

4051-
[Collection(nameof(DisableParallelization))]
40524044
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40534045
public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3 : HttpClientHandlerTest_Headers
40544046
{
40554047
public SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3(ITestOutputHelper output) : base(output) { }
40564048
protected override Version UseVersion => HttpVersion.Version30;
40574049
}
40584050

4059-
[Collection(nameof(DisableParallelization))]
40604051
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40614052
public sealed class SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3 : SocketsHttpHandler_Cancellation_Test
40624053
{
40634054
public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3(ITestOutputHelper output) : base(output) { }
40644055
protected override Version UseVersion => HttpVersion.Version30;
40654056
}
40664057

4067-
[Collection(nameof(DisableParallelization))]
40684058
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40694059
public sealed class SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3 : HttpClientHandler_AltSvc_Test
40704060
{
40714061
public SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3(ITestOutputHelper output) : base(output) { }
40724062
protected override Version UseVersion => HttpVersion.Version30;
40734063
}
40744064

4075-
[Collection(nameof(DisableParallelization))]
40764065
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40774066
public sealed class SocketsHttpHandler_HttpClientHandler_Finalization_Http3 : HttpClientHandler_Finalization_Test
40784067
{
@@ -4237,7 +4226,6 @@ public SocketsHttpHandler_RequestContentLengthMismatchTest_Http2(ITestOutputHelp
42374226
protected override Version UseVersion => HttpVersion.Version20;
42384227
}
42394228

4240-
[Collection(nameof(DisableParallelization))]
42414229
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
42424230
public sealed class SocketsHttpHandler_RequestContentLengthMismatchTest_Http3 : SocketsHttpHandler_RequestContentLengthMismatchTest
42434231
{
@@ -4414,7 +4402,6 @@ public SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http2(ITestOutputHelpe
44144402
protected override Version UseVersion => HttpVersion.Version20;
44154403
}
44164404

4417-
[Collection(nameof(DisableParallelization))]
44184405
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
44194406
public sealed class SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http3 : SocketsHttpHandler_SecurityTest
44204407
{
@@ -4543,7 +4530,6 @@ await Http11LoopbackServerFactory.Singleton.CreateClientAndServerAsync(async uri
45434530
}
45444531
}
45454532

4546-
[Collection(nameof(DisableParallelization))]
45474533
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
45484534
public sealed class SocketsHttpHandler_HttpRequestErrorTest_Http30 : SocketsHttpHandler_HttpRequestErrorTest
45494535
{

src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestCollection.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
namespace System.Net.Quic.Tests;
1717

18-
[CollectionDefinition(nameof(QuicTestCollection), DisableParallelization = true)]
18+
[CollectionDefinition(nameof(QuicTestCollection))]
1919
public unsafe class QuicTestCollection : ICollectionFixture<QuicTestCollection>, IDisposable
2020
{
2121
public static bool IsSupported => QuicListener.IsSupported && QuicConnection.IsSupported;

0 commit comments

Comments
 (0)