From 38dbfff0607aa42b56dcbf1365dbead17fb45c42 Mon Sep 17 00:00:00 2001 From: Kenneth Pouncey Date: Tue, 17 Nov 2020 08:06:01 +0100 Subject: [PATCH 1/8] [browser][tests] Standup System.Net.WebSockets.Client.Tests in CI --- .../tests/ClientWebSocketOptionsTests.cs | 8 ++++++++ .../System.Net.WebSockets.Client/tests/CloseTest.cs | 1 + .../System.Net.WebSockets.Client/tests/ConnectTest.cs | 5 +++++ .../System.Net.WebSockets.Client/tests/SendReceiveTest.cs | 1 + src/libraries/tests.proj | 1 - 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs index 8065bc3b38aea..a11c4aa9f4737 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs @@ -17,6 +17,7 @@ public class ClientWebSocketOptionsTests : ClientWebSocketTestBase public ClientWebSocketOptionsTests(ITestOutputHelper output) : base(output) { } [ConditionalFact(nameof(WebSocketsSupported))] + [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser public static void UseDefaultCredentials_Roundtrips() { var cws = new ClientWebSocket(); @@ -28,6 +29,7 @@ public static void UseDefaultCredentials_Roundtrips() } [ConditionalFact(nameof(WebSocketsSupported))] + [PlatformSpecific(~TestPlatforms.Browser)] // Proxy not supported on browser public static void Proxy_Roundtrips() { var cws = new ClientWebSocket(); @@ -99,6 +101,7 @@ public async Task Proxy_ConnectThruProxy_Success(Uri server) } [ConditionalFact(nameof(WebSocketsSupported))] + [PlatformSpecific(~TestPlatforms.Browser)] // Buffer not supported on browser public static void SetBuffer_InvalidArgs_Throws() { // Recreate the minimum WebSocket buffer size values from the .NET Framework version of WebSocket, @@ -120,6 +123,7 @@ public static void SetBuffer_InvalidArgs_Throws() } [ConditionalFact(nameof(WebSocketsSupported))] + [PlatformSpecific(~TestPlatforms.Browser)] // KeepAlive not supported on browser public static void KeepAliveInterval_Roundtrips() { var cws = new ClientWebSocket(); @@ -138,6 +142,7 @@ public static void KeepAliveInterval_Roundtrips() } [ConditionalFact(nameof(WebSocketsSupported))] + [PlatformSpecific(~TestPlatforms.Browser)] // Certificates not supported on browser public void RemoteCertificateValidationCallback_Roundtrips() { using (var cws = new ClientWebSocket()) @@ -157,6 +162,7 @@ public void RemoteCertificateValidationCallback_Roundtrips() [ConditionalTheory(nameof(WebSocketsSupported))] [InlineData(false)] [InlineData(true)] + [PlatformSpecific(~TestPlatforms.Browser)] // Certificates not supported on browser public async Task RemoteCertificateValidationCallback_PassedRemoteCertificateInfo(bool secure) { if (PlatformDetection.IsWindows7) @@ -193,6 +199,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => [OuterLoop("Connects to remote service")] [ConditionalFact(nameof(WebSocketsSupported))] + [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser public async Task ClientCertificates_ValidCertificate_ServerReceivesCertificateAndConnectAsyncSucceeds() { if (PlatformDetection.IsWindows7) @@ -230,6 +237,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] [InlineData("ws://")] [InlineData("wss://")] + [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser public async Task NonSecureConnect_ConnectThruProxy_CONNECTisUsed(string connectionType) { if (PlatformDetection.IsWindows7) diff --git a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs index 7bdffd25e99b8..c662674a07bf7 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs @@ -327,6 +327,7 @@ public async Task CloseAsync_DuringConcurrentReceiveAsync_ExpectedStates(Uri ser [ConditionalFact(nameof(WebSocketsSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [PlatformSpecific(~TestPlatforms.Browser)] // LoopBack not not supported on browser public async Task CloseAsync_CancelableEvenWhenPendingReceive_Throws() { var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs index 265db6d6c4167..3d26722bb65c8 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs @@ -89,6 +89,7 @@ public async Task ConnectAsync_AddCustomHeaders_Success(Uri server) [ConditionalFact(nameof(WebSocketsSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [PlatformSpecific(~TestPlatforms.Browser)] // Loopback not supported on browser public async Task ConnectAsync_AddHostHeader_Success() { string expectedHost = null; @@ -208,6 +209,7 @@ public async Task ConnectAsync_PassMultipleSubProtocols_ServerRequires_Connectio [ConditionalFact(nameof(WebSocketsSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [PlatformSpecific(~TestPlatforms.Browser)] // Loopback not supported on browser public async Task ConnectAsync_NonStandardRequestHeaders_HeadersAddedWithoutValidation() { await LoopbackServer.CreateClientAndServerAsync(async uri => @@ -227,6 +229,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] + [PlatformSpecific(~TestPlatforms.Browser)] // Loopback not supported on browser public async Task ConnectAndCloseAsync_UseProxyServer_ExpectedClosedState(Uri server) { using (var cws = new ClientWebSocket()) @@ -246,6 +249,7 @@ public async Task ConnectAndCloseAsync_UseProxyServer_ExpectedClosedState(Uri se } [ConditionalFact(nameof(WebSocketsSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/44720")] public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperationCanceledException() { using (var clientSocket = new ClientWebSocket()) @@ -259,6 +263,7 @@ public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperatio [ConditionalFact(nameof(WebSocketsSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [PlatformSpecific(~TestPlatforms.Browser)] // Loopback not supported on browser public async Task ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException() { var releaseServer = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); diff --git a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs index 163fc2b530e38..ef0a432f9b136 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs @@ -389,6 +389,7 @@ public async Task SendReceive_Concurrent_Success(Uri server) [OuterLoop("Uses external servers")] [ConditionalFact(nameof(WebSocketsSupported))] + [PlatformSpecific(~TestPlatforms.Browser)] // LoopBack not not supported on browser public async Task SendReceive_ConnectionClosedPrematurely_ReceiveAsyncFailsAndWebSocketStateUpdated() { var options = new LoopbackServer.Options { WebSocketEndpoint = true }; diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 511f7f68fe002..7a57738a2f7b3 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -157,7 +157,6 @@ - From eb6b30b69438d0afc550fcfd224ce23c69364cb9 Mon Sep 17 00:00:00 2001 From: Kenneth Pouncey Date: Tue, 17 Nov 2020 10:22:15 +0100 Subject: [PATCH 2/8] Just a small test to see if tests are actually kicked off and failing. --- src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs index 3d26722bb65c8..e84745fe653d9 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs @@ -249,7 +249,7 @@ public async Task ConnectAndCloseAsync_UseProxyServer_ExpectedClosedState(Uri se } [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/44720")] + //[ActiveIssue("https://github.com/dotnet/runtime/issues/44720")] public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperationCanceledException() { using (var clientSocket = new ClientWebSocket()) From 171253ae030347800925fd0311ef20b88d63e3f2 Mon Sep 17 00:00:00 2001 From: Kenneth Pouncey Date: Tue, 17 Nov 2020 11:56:05 +0100 Subject: [PATCH 3/8] Remove comment from ActiveIssue to pass tests --- src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs index e84745fe653d9..3d26722bb65c8 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs @@ -249,7 +249,7 @@ public async Task ConnectAndCloseAsync_UseProxyServer_ExpectedClosedState(Uri se } [ConditionalFact(nameof(WebSocketsSupported))] - //[ActiveIssue("https://github.com/dotnet/runtime/issues/44720")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/44720")] public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperationCanceledException() { using (var clientSocket = new ClientWebSocket()) From 5a776dda7752bbacf749586f38c15f65e3fda657 Mon Sep 17 00:00:00 2001 From: Kenneth Pouncey Date: Wed, 18 Nov 2020 07:36:07 +0100 Subject: [PATCH 4/8] Address review comments - mark the loopback issues as activeIssue - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] --- .../tests/ClientWebSocketOptionsTests.cs | 1 + .../System.Net.WebSockets.Client/tests/CloseTest.cs | 2 +- .../System.Net.WebSockets.Client/tests/ConnectTest.cs | 7 +++---- .../System.Net.WebSockets.Client/tests/SendReceiveTest.cs | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs index a11c4aa9f4737..2611156f1ab6d 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs @@ -235,6 +235,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => [ConditionalTheory(nameof(WebSocketsSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] [InlineData("ws://")] [InlineData("wss://")] [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser diff --git a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs index c662674a07bf7..9fbd9b8734d8e 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs @@ -327,7 +327,7 @@ public async Task CloseAsync_DuringConcurrentReceiveAsync_ExpectedStates(Uri ser [ConditionalFact(nameof(WebSocketsSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [PlatformSpecific(~TestPlatforms.Browser)] // LoopBack not not supported on browser + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] public async Task CloseAsync_CancelableEvenWhenPendingReceive_Throws() { var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs index 3d26722bb65c8..36adcfece300e 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs @@ -89,7 +89,7 @@ public async Task ConnectAsync_AddCustomHeaders_Success(Uri server) [ConditionalFact(nameof(WebSocketsSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [PlatformSpecific(~TestPlatforms.Browser)] // Loopback not supported on browser + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] public async Task ConnectAsync_AddHostHeader_Success() { string expectedHost = null; @@ -209,7 +209,7 @@ public async Task ConnectAsync_PassMultipleSubProtocols_ServerRequires_Connectio [ConditionalFact(nameof(WebSocketsSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [PlatformSpecific(~TestPlatforms.Browser)] // Loopback not supported on browser + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] public async Task ConnectAsync_NonStandardRequestHeaders_HeadersAddedWithoutValidation() { await LoopbackServer.CreateClientAndServerAsync(async uri => @@ -229,7 +229,6 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] - [PlatformSpecific(~TestPlatforms.Browser)] // Loopback not supported on browser public async Task ConnectAndCloseAsync_UseProxyServer_ExpectedClosedState(Uri server) { using (var cws = new ClientWebSocket()) @@ -263,7 +262,7 @@ public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperatio [ConditionalFact(nameof(WebSocketsSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [PlatformSpecific(~TestPlatforms.Browser)] // Loopback not supported on browser + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] public async Task ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException() { var releaseServer = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); diff --git a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs index ef0a432f9b136..ff9cb83f07f1a 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs @@ -389,7 +389,8 @@ public async Task SendReceive_Concurrent_Success(Uri server) [OuterLoop("Uses external servers")] [ConditionalFact(nameof(WebSocketsSupported))] - [PlatformSpecific(~TestPlatforms.Browser)] // LoopBack not not supported on browser + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] public async Task SendReceive_ConnectionClosedPrematurely_ReceiveAsyncFailsAndWebSocketStateUpdated() { var options = new LoopbackServer.Options { WebSocketEndpoint = true }; From def63694e8a0cca56e5eccf0604b8360341e3693 Mon Sep 17 00:00:00 2001 From: Kenneth Pouncey Date: Thu, 19 Nov 2020 06:01:43 +0100 Subject: [PATCH 5/8] Address review comments --- .../tests/ClientWebSocketOptionsTests.cs | 4 ++-- .../System.Net.WebSockets.Client/tests/CloseTest.cs | 4 ++-- .../tests/ConnectTest.cs | 12 ++++++------ .../tests/SendReceiveTest.cs | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs index 2611156f1ab6d..d3a92334d4323 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs @@ -234,8 +234,8 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => } [ConditionalTheory(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] [InlineData("ws://")] [InlineData("wss://")] [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser diff --git a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs index 9fbd9b8734d8e..e5341d0f2a467 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs @@ -326,8 +326,8 @@ public async Task CloseAsync_DuringConcurrentReceiveAsync_ExpectedStates(Uri ser } [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task CloseAsync_CancelableEvenWhenPendingReceive_Throws() { var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs index 36adcfece300e..81ad7bbc61abb 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs @@ -88,8 +88,8 @@ public async Task ConnectAsync_AddCustomHeaders_Success(Uri server) } [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ConnectAsync_AddHostHeader_Success() { string expectedHost = null; @@ -208,8 +208,8 @@ public async Task ConnectAsync_PassMultipleSubProtocols_ServerRequires_Connectio } [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ConnectAsync_NonStandardRequestHeaders_HeadersAddedWithoutValidation() { await LoopbackServer.CreateClientAndServerAsync(async uri => @@ -261,8 +261,8 @@ public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperatio } [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException() { var releaseServer = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); diff --git a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs index ff9cb83f07f1a..a2a24c2822900 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs @@ -389,8 +389,8 @@ public async Task SendReceive_Concurrent_Success(Uri server) [OuterLoop("Uses external servers")] [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendReceive_ConnectionClosedPrematurely_ReceiveAsyncFailsAndWebSocketStateUpdated() { var options = new LoopbackServer.Options { WebSocketEndpoint = true }; From 2d49b2d82ab4e3ca928a2edc7e3f1c4a64b5b0e8 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Thu, 19 Nov 2020 23:27:20 -0600 Subject: [PATCH 6/8] Correct confusion I caused --- .../tests/ClientWebSocketOptionsTests.cs | 3 +-- .../System.Net.WebSockets.Client/tests/CloseTest.cs | 2 +- .../System.Net.WebSockets.Client/tests/ConnectTest.cs | 6 +++--- .../System.Net.WebSockets.Client/tests/SendReceiveTest.cs | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs index d3a92334d4323..a11c4aa9f4737 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs @@ -234,8 +234,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => } [ConditionalTheory(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] [InlineData("ws://")] [InlineData("wss://")] [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser diff --git a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs index e5341d0f2a467..a803d4cb021fa 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs @@ -326,7 +326,7 @@ public async Task CloseAsync_DuringConcurrentReceiveAsync_ExpectedStates(Uri ser } [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task CloseAsync_CancelableEvenWhenPendingReceive_Throws() { diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs index 81ad7bbc61abb..ec7824b6c1ce4 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs @@ -88,7 +88,7 @@ public async Task ConnectAsync_AddCustomHeaders_Success(Uri server) } [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ConnectAsync_AddHostHeader_Success() { @@ -208,7 +208,7 @@ public async Task ConnectAsync_PassMultipleSubProtocols_ServerRequires_Connectio } [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ConnectAsync_NonStandardRequestHeaders_HeadersAddedWithoutValidation() { @@ -261,7 +261,7 @@ public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperatio } [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException() { diff --git a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs index a2a24c2822900..e5c822457ad9b 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs @@ -389,7 +389,7 @@ public async Task SendReceive_Concurrent_Success(Uri server) [OuterLoop("Uses external servers")] [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows | TestPlatforms.Browser, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendReceive_ConnectionClosedPrematurely_ReceiveAsyncFailsAndWebSocketStateUpdated() { From 52f8b4872ec050aff035158856e90f975f5b67e5 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Thu, 19 Nov 2020 23:34:12 -0600 Subject: [PATCH 7/8] Remove extra extra exclusion that snuck in --- .../System.Net.WebSockets.Client/tests/SendReceiveTest.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs index e5c822457ad9b..5bfc2c911d754 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs @@ -389,7 +389,6 @@ public async Task SendReceive_Concurrent_Success(Uri server) [OuterLoop("Uses external servers")] [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendReceive_ConnectionClosedPrematurely_ReceiveAsyncFailsAndWebSocketStateUpdated() { From f1059f74a6b0319e8ff5ba3d2895601ded3823bf Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Thu, 19 Nov 2020 23:36:20 -0600 Subject: [PATCH 8/8] Make browser specific failure browser specific --- src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs index ec7824b6c1ce4..45c94e4164428 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs @@ -248,7 +248,7 @@ public async Task ConnectAndCloseAsync_UseProxyServer_ExpectedClosedState(Uri se } [ConditionalFact(nameof(WebSocketsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/44720")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/44720", TestPlatforms.Browser)] public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperationCanceledException() { using (var clientSocket = new ClientWebSocket())