Skip to content

Commit 8188d86

Browse files
CarnaViireRuihan-Yin
authored andcommitted
Disable parallel test execution for QUIC and HTTP/3 (dotnet#101569)
* Disable noisy tests * Disable parallel test execution for QUIC and HTTP/3
1 parent c61984d commit 8188d86

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

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

+1-1
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 async Task GetAsync_DefaultCoookieContainer_NoCookieSent()
47+
public virtual async Task GetAsync_DefaultCoookieContainer_NoCookieSent()
4848
{
4949
await LoopbackServerFactory.CreateClientAndServerAsync(
5050
async uri =>

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,15 @@ private HttpClient CreateHttpClient(Version version)
2929
return client;
3030
}
3131

32-
[Theory]
32+
[ConditionalTheory]
3333
[MemberData(nameof(AltSvcHeaderUpgradeVersions))]
3434
public async Task AltSvc_Header_Upgrade_Success(Version fromVersion, bool overrideHost)
3535
{
36+
if (UseVersion == HttpVersion30 && fromVersion == HttpVersion.Version11 && overrideHost)
37+
{
38+
throw new SkipTestException("https://github.com/dotnet/runtime/issues/91757");
39+
}
40+
3641
// 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.
3742
using GenericLoopbackServer firstServer =
3843
fromVersion.Major switch

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

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

1636+
[Collection(nameof(DisableParallelization))]
16361637
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
16371638
[ActiveIssue("https://github.com/dotnet/runtime/issues/91757")]
16381639
[ActiveIssue("https://github.com/dotnet/runtime/issues/101015")]
@@ -4027,41 +4028,51 @@ public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http2(ITestOutputH
40274028
protected override Version UseVersion => HttpVersion.Version20;
40284029
}
40294030

4031+
[Collection(nameof(DisableParallelization))]
40304032
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40314033
public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Http3 : HttpClientHandlerTest
40324034
{
40334035
public SocketsHttpHandlerTest_HttpClientHandlerTest_Http3(ITestOutputHelper output) : base(output) { }
40344036
protected override Version UseVersion => HttpVersion.Version30;
40354037
}
40364038

4039+
[Collection(nameof(DisableParallelization))]
40374040
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40384041
public sealed class SocketsHttpHandlerTest_Cookies_Http3 : HttpClientHandlerTest_Cookies
40394042
{
40404043
public SocketsHttpHandlerTest_Cookies_Http3(ITestOutputHelper output) : base(output) { }
40414044
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!; }
40424049
}
40434050

4051+
[Collection(nameof(DisableParallelization))]
40444052
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40454053
public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3 : HttpClientHandlerTest_Headers
40464054
{
40474055
public SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3(ITestOutputHelper output) : base(output) { }
40484056
protected override Version UseVersion => HttpVersion.Version30;
40494057
}
40504058

4059+
[Collection(nameof(DisableParallelization))]
40514060
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40524061
public sealed class SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3 : SocketsHttpHandler_Cancellation_Test
40534062
{
40544063
public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3(ITestOutputHelper output) : base(output) { }
40554064
protected override Version UseVersion => HttpVersion.Version30;
40564065
}
40574066

4067+
[Collection(nameof(DisableParallelization))]
40584068
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40594069
public sealed class SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3 : HttpClientHandler_AltSvc_Test
40604070
{
40614071
public SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3(ITestOutputHelper output) : base(output) { }
40624072
protected override Version UseVersion => HttpVersion.Version30;
40634073
}
40644074

4075+
[Collection(nameof(DisableParallelization))]
40654076
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
40664077
public sealed class SocketsHttpHandler_HttpClientHandler_Finalization_Http3 : HttpClientHandler_Finalization_Test
40674078
{
@@ -4226,6 +4237,7 @@ public SocketsHttpHandler_RequestContentLengthMismatchTest_Http2(ITestOutputHelp
42264237
protected override Version UseVersion => HttpVersion.Version20;
42274238
}
42284239

4240+
[Collection(nameof(DisableParallelization))]
42294241
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
42304242
public sealed class SocketsHttpHandler_RequestContentLengthMismatchTest_Http3 : SocketsHttpHandler_RequestContentLengthMismatchTest
42314243
{
@@ -4402,6 +4414,7 @@ public SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http2(ITestOutputHelpe
44024414
protected override Version UseVersion => HttpVersion.Version20;
44034415
}
44044416

4417+
[Collection(nameof(DisableParallelization))]
44054418
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
44064419
public sealed class SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http3 : SocketsHttpHandler_SecurityTest
44074420
{
@@ -4530,6 +4543,7 @@ await Http11LoopbackServerFactory.Singleton.CreateClientAndServerAsync(async uri
45304543
}
45314544
}
45324545

4546+
[Collection(nameof(DisableParallelization))]
45334547
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
45344548
public sealed class SocketsHttpHandler_HttpRequestErrorTest_Http30 : SocketsHttpHandler_HttpRequestErrorTest
45354549
{

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

0 commit comments

Comments
 (0)