Skip to content

Commit

Permalink
Disable QUIC&HTTP/3 parallelization on tests (dotnet#104948)
Browse files Browse the repository at this point in the history
* Disable QUIC&HTTP/3 parallelization

* Disable parallelization on more tests

* Disable parallelization on HttpMetrics_Http30_MessageInvoker
  • Loading branch information
liveans authored Jul 16, 2024
1 parent 2b3088b commit 25a5085
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

namespace System.Net.Http.Functional.Tests
{
[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class HttpClientHandlerTest_Http3 : HttpClientHandlerTestBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public void CreateAndDestroyManyClients(int numClients)
}
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandler_HttpClientMiniStress_Http3 : HttpClientMiniStress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,7 @@ public HttpMetricsTest_Http20_HttpMessageInvoker(ITestOutputHelper output) : bas
}
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public class HttpMetricsTest_Http30 : HttpMetricsTest
Expand All @@ -1173,6 +1174,7 @@ public HttpMetricsTest_Http30(ITestOutputHelper output) : base(output)
}
}

[Collection(nameof(DisableParallelization))]
public class HttpMetricsTest_Http30_HttpMessageInvoker : HttpMetricsTest_Http30
{
protected override bool TestHttpMessageInvoker => true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public Http2ResponseStreamZeroByteReadTest(ITestOutputHelper output) : base(outp
protected override Version UseVersion => HttpVersion.Version20;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class Http3ResponseStreamZeroByteReadTest : ResponseStreamZeroByteReadTestBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ public SocketsHttpHandler_DiagnosticsTest_Http2(ITestOutputHelper output) : base
protected override Version UseVersion => HttpVersion.Version20;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandler_DiagnosticsTest_Http3 : DiagnosticsTest
Expand Down Expand Up @@ -1710,6 +1711,7 @@ public SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http2(ITest
protected override Version UseVersion => HttpVersion.Version20;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http3 : SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength
Expand Down Expand Up @@ -4090,6 +4092,7 @@ public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http2(ITestOutputH
protected override Version UseVersion => HttpVersion.Version20;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Http3 : HttpClientHandlerTest
Expand All @@ -4098,6 +4101,7 @@ public SocketsHttpHandlerTest_HttpClientHandlerTest_Http3(ITestOutputHelper outp
protected override Version UseVersion => HttpVersion.Version30;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandlerTest_Cookies_Http3 : HttpClientHandlerTest_Cookies
Expand All @@ -4106,6 +4110,7 @@ public SocketsHttpHandlerTest_Cookies_Http3(ITestOutputHelper output) : base(out
protected override Version UseVersion => HttpVersion.Version30;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3 : HttpClientHandlerTest_Headers
Expand All @@ -4114,6 +4119,7 @@ public SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3(ITestOutputHel
protected override Version UseVersion => HttpVersion.Version30;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3 : SocketsHttpHandler_Cancellation_Test
Expand All @@ -4122,6 +4128,7 @@ public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3(ITestOutputH
protected override Version UseVersion => HttpVersion.Version30;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3 : HttpClientHandler_AltSvc_Test
Expand All @@ -4130,6 +4137,7 @@ public SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3(ITestOutputHelper
protected override Version UseVersion => HttpVersion.Version30;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandler_HttpClientHandler_Finalization_Http3 : HttpClientHandler_Finalization_Test
Expand Down Expand Up @@ -4288,6 +4296,7 @@ public SocketsHttpHandler_RequestContentLengthMismatchTest_Http2(ITestOutputHelp
protected override Version UseVersion => HttpVersion.Version20;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandler_RequestContentLengthMismatchTest_Http3 : SocketsHttpHandler_RequestContentLengthMismatchTest
Expand Down Expand Up @@ -4465,6 +4474,7 @@ public SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http2(ITestOutputHelpe
protected override Version UseVersion => HttpVersion.Version20;
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http3 : SocketsHttpHandler_SecurityTest
Expand Down Expand Up @@ -4594,6 +4604,7 @@ await Http11LoopbackServerFactory.Singleton.CreateClientAndServerAsync(async uri
}
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class SocketsHttpHandler_HttpRequestErrorTest_Http30 : SocketsHttpHandler_HttpRequestErrorTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,7 @@ public sealed class TelemetryTest_Http20 : TelemetryTest
public TelemetryTest_Http20(ITestOutputHelper output) : base(output) { }
}

[Collection(nameof(DisableParallelization))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103703", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
public sealed class TelemetryTest_Http30 : TelemetryTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace System.Net.Quic.Tests;

[CollectionDefinition(nameof(QuicTestCollection))]
[CollectionDefinition(nameof(QuicTestCollection), DisableParallelization = true)]
public unsafe class QuicTestCollection : ICollectionFixture<QuicTestCollection>, IDisposable
{
public static bool IsSupported => QuicListener.IsSupported && QuicConnection.IsSupported;
Expand Down

0 comments on commit 25a5085

Please sign in to comment.