Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace System.Net.Http.Functional.Tests
{
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class HttpClientHandlerTest_Http3 : HttpClientHandlerTestBase
{
protected override Version UseVersion => HttpVersion.Version30;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ protected static async Task<Stream> DefaultConnectCallback(EndPoint endPoint, Ca

protected static bool IsWinHttpHandler => false;

public static bool IsQuicSupported
public static bool IsHttp3Supported
{
get
{
try
{
return QuicConnection.IsSupported;
return QuicConnection.IsSupported
&& (bool)Type.GetType("System.Net.Http.GlobalHttpSettings+SocketsHttpHandler, System.Net.Http").GetProperty("AllowHttp3").GetValue(null);
}
catch (System.PlatformNotSupportedException)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void CreateAndDestroyManyClients(int numClients)
}
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_HttpClientMiniStress_Http3 : HttpClientMiniStress
{
public SocketsHttpHandler_HttpClientMiniStress_Http3(ITestOutputHelper output) : base(output) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ public HttpMetricsTest_Http20_HttpMessageInvoker(ITestOutputHelper output) : bas
}
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public class HttpMetricsTest_Http30 : HttpMetricsTest
{
protected override Version UseVersion => HttpVersion.Version30;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public Http2ResponseStreamZeroByteReadTest(ITestOutputHelper output) : base(outp
protected override Version UseVersion => HttpVersion.Version20;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class Http3ResponseStreamZeroByteReadTest : ResponseStreamZeroByteReadTestBase
{
public Http3ResponseStreamZeroByteReadTest(ITestOutputHelper output) : base(output) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http2(ITestOutputHel
protected override Version UseVersion => HttpVersion.Version20;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http3 : SocketsHttpHandler_HttpClientHandler_Asynchrony_Test
{
public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http3(ITestOutputHelper output) : base(output) { }
Expand Down Expand Up @@ -331,7 +331,7 @@ public SocketsHttpHandler_DiagnosticsTest_Http2(ITestOutputHelper output) : base
protected override Version UseVersion => HttpVersion.Version20;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_DiagnosticsTest_Http3 : DiagnosticsTest
{
public SocketsHttpHandler_DiagnosticsTest_Http3(ITestOutputHelper output) : base(output) { }
Expand Down Expand Up @@ -1248,7 +1248,7 @@ public async Task Http2GetAsync_TrailerHeaders_TrailingPseudoHeadersThrow()
}
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_Http3_TrailingHeaders_Test : SocketsHttpHandler_TrailingHeaders_Test
{
public SocketsHttpHandler_Http3_TrailingHeaders_Test(ITestOutputHelper output) : base(output) { }
Expand Down Expand Up @@ -1815,7 +1815,7 @@ public SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http2(ITest
protected override Version UseVersion => HttpVersion.Version20;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http3 : SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength
{
public SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http3(ITestOutputHelper output) : base(output) { }
Expand Down Expand Up @@ -4197,42 +4197,42 @@ public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http2(ITestOutputH
protected override Version UseVersion => HttpVersion.Version20;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Http3 : HttpClientHandlerTest
{
public SocketsHttpHandlerTest_HttpClientHandlerTest_Http3(ITestOutputHelper output) : base(output) { }
protected override Version UseVersion => HttpVersion.Version30;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandlerTest_Cookies_Http3 : HttpClientHandlerTest_Cookies
{
public SocketsHttpHandlerTest_Cookies_Http3(ITestOutputHelper output) : base(output) { }
protected override Version UseVersion => HttpVersion.Version30;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3 : HttpClientHandlerTest_Headers
{
public SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3(ITestOutputHelper output) : base(output) { }
protected override Version UseVersion => HttpVersion.Version30;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3 : SocketsHttpHandler_Cancellation_Test
{
public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3(ITestOutputHelper output) : base(output) { }
protected override Version UseVersion => HttpVersion.Version30;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3 : HttpClientHandler_AltSvc_Test
{
public SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3(ITestOutputHelper output) : base(output) { }
protected override Version UseVersion => HttpVersion.Version30;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_HttpClientHandler_Finalization_Http3 : HttpClientHandler_Finalization_Test
{
public SocketsHttpHandler_HttpClientHandler_Finalization_Http3(ITestOutputHelper output) : base(output) { }
Expand Down Expand Up @@ -4389,7 +4389,7 @@ public SocketsHttpHandler_RequestContentLengthMismatchTest_Http2(ITestOutputHelp
protected override Version UseVersion => HttpVersion.Version20;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_RequestContentLengthMismatchTest_Http3 : SocketsHttpHandler_RequestContentLengthMismatchTest
{
public SocketsHttpHandler_RequestContentLengthMismatchTest_Http3(ITestOutputHelper output) : base(output) { }
Expand Down Expand Up @@ -4573,7 +4573,7 @@ public SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http2(ITestOutputHelpe
protected override Version UseVersion => HttpVersion.Version20;
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http3 : SocketsHttpHandler_SecurityTest, IClassFixture<CertificateSetup>
{
public SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http3(ITestOutputHelper output, CertificateSetup certificateSetup) : base(output, certificateSetup) { }
Expand Down Expand Up @@ -4701,7 +4701,7 @@ await Http11LoopbackServerFactory.Singleton.CreateClientAndServerAsync(async uri
}
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class SocketsHttpHandler_HttpRequestErrorTest_Http30 : SocketsHttpHandler_HttpRequestErrorTest
{
public SocketsHttpHandler_HttpRequestErrorTest_Http30(ITestOutputHelper output) : base(output) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ public sealed class TelemetryTest_Http20 : TelemetryTest
public TelemetryTest_Http20(ITestOutputHelper output) : base(output) { }
}

[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))]
public sealed class TelemetryTest_Http30 : TelemetryTest
{
protected override Version UseVersion => HttpVersion.Version30;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<_EnableConsumingManagedCodeFromNativeHosting Condition="'$(_EnableConsumingManagedCodeFromNativeHosting)' == ''">false</_EnableConsumingManagedCodeFromNativeHosting>
<VerifyDependencyInjectionOpenGenericServiceTrimmability Condition="'$(VerifyDependencyInjectionOpenGenericServiceTrimmability)' == ''">true</VerifyDependencyInjectionOpenGenericServiceTrimmability>
<JsonSerializerIsReflectionEnabledByDefault Condition="'$(JsonSerializerIsReflectionEnabledByDefault)' == ''">false</JsonSerializerIsReflectionEnabledByDefault>
<Http3Support Condition="'$(Http3Support)' == ''">false</Http3Support>
<!-- Linux Bionic doesn't ship GSSAPI, so enable managed implementation -->
<_UseManagedNtlm Condition="'$(_UseManagedNtlm)' == '' and $(RuntimeIdentifier.StartsWith('linux-bionic'))">true</_UseManagedNtlm>
<!-- Trim managed NTLM on Linux when it's not explicitly requested -->
Expand Down
Loading