Handle ifdefs
This commit is contained in:
parent
3095b86da1
commit
bb70e7077f
|
|
@ -136,10 +136,8 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn
|
||||||
var appPath = Helpers.GetApplicationPath("AutobahnTestApp");
|
var appPath = Helpers.GetApplicationPath("AutobahnTestApp");
|
||||||
var configPath = Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "Http.config");
|
var configPath = Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "Http.config");
|
||||||
var targetFramework =
|
var targetFramework =
|
||||||
#if NETCOREAPP2_1
|
#if NETCOREAPP2_2
|
||||||
"netcoreapp2.1";
|
"netcoreapp2.2";
|
||||||
#elif NETCOREAPP2_0
|
|
||||||
"netcoreapp2.0";
|
|
||||||
#else
|
#else
|
||||||
#error Target frameworks need to be updated
|
#error Target frameworks need to be updated
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -160,7 +158,7 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
var handler = new HttpClientHandler();
|
var handler = new HttpClientHandler();
|
||||||
// Win7 HttpClient on NetCoreApp2.1 defaults to TLS 1.0 and won't connect to Kestrel. https://github.com/dotnet/corefx/issues/28733
|
// Win7 HttpClient on NetCoreApp2.2 defaults to TLS 1.0 and won't connect to Kestrel. https://github.com/dotnet/corefx/issues/28733
|
||||||
// Mac HttpClient on NetCoreApp2.0 doesn't alow you to set some combinations.
|
// Mac HttpClient on NetCoreApp2.0 doesn't alow you to set some combinations.
|
||||||
// https://github.com/dotnet/corefx/blob/586cffcdfdf23ad6c193a4bf37fce88a1bf69508/src/System.Net.Http/src/System/Net/Http/CurlHandler/CurlHandler.SslProvider.OSX.cs#L104-L106
|
// https://github.com/dotnet/corefx/blob/586cffcdfdf23ad6c193a4bf37fce88a1bf69508/src/System.Net.Http/src/System/Net/Http/CurlHandler/CurlHandler.SslProvider.OSX.cs#L104-L106
|
||||||
handler.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls;
|
handler.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls;
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,10 @@ using Xunit.Abstractions;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.WebSockets.Test
|
namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
{
|
{
|
||||||
#if NET461 || NETCOREAPP2_0
|
#if NET461
|
||||||
// ClientWebSocket does not support WebSockets on these platforms and OS. Kestrel does support it.
|
// ClientWebSocket does not support WebSockets on these platforms and OS. Kestrel does support it.
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
#elif NETCOREAPP2_1
|
#elif NETCOREAPP2_2
|
||||||
// ClientWebSocket has added support for WebSockets on Win7.
|
// ClientWebSocket has added support for WebSockets on Win7.
|
||||||
#else
|
#else
|
||||||
#error Unknown TFM
|
#error Unknown TFM
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue