From 60f8ddba741d9331fc0ea7ac793ce3aee8adf87f Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 25 Jul 2016 14:14:58 -0700 Subject: [PATCH] Use WebSockets ppkg version supported on unix and enable tests --- src/Common/test-runtime/project.json | 1 + .../src/project.json | 2 +- .../WebSockets/WebSocketTests.4.1.0.cs | 105 +----------------- 3 files changed, 7 insertions(+), 101 deletions(-) diff --git a/src/Common/test-runtime/project.json b/src/Common/test-runtime/project.json index 31c745b9f23..8a2b1780e27 100644 --- a/src/Common/test-runtime/project.json +++ b/src/Common/test-runtime/project.json @@ -18,6 +18,7 @@ "Microsoft.DotNet.BuildTools.TestSuite": "1.0.0-prerelease-00520-02", "System.Collections.NonGeneric": "4.0.1", "System.Collections.Specialized": "4.0.1", + "System.Net.WebSockets.Client": "4.0.1-beta-24322-03", "System.Xml.XmlDocument": "4.0.1", "xunit.console.netcore": "1.0.3-prerelease-00607-01" }, diff --git a/src/System.Private.ServiceModel/src/project.json b/src/System.Private.ServiceModel/src/project.json index 56b32d4317a..a2b4bc52627 100644 --- a/src/System.Private.ServiceModel/src/project.json +++ b/src/System.Private.ServiceModel/src/project.json @@ -21,7 +21,7 @@ "System.Net.Primitives": "4.0.10", "System.Net.WebHeaderCollection": "4.0.0", "System.Net.WebSockets": "4.0.0", - "System.Net.WebSockets.Client": "4.0.0", + "System.Net.WebSockets.Client": "4.0.1-beta-24322-03", "System.ObjectModel": "4.0.0", "System.Reflection": "4.0.10", "System.Reflection.DispatchProxy": "4.0.0", diff --git a/src/System.Private.ServiceModel/tests/Scenarios/Extensibility/WebSockets/WebSocketTests.4.1.0.cs b/src/System.Private.ServiceModel/tests/Scenarios/Extensibility/WebSockets/WebSocketTests.4.1.0.cs index 90668b77196..dbb18d291a7 100644 --- a/src/System.Private.ServiceModel/tests/Scenarios/Extensibility/WebSockets/WebSocketTests.4.1.0.cs +++ b/src/System.Private.ServiceModel/tests/Scenarios/Extensibility/WebSockets/WebSocketTests.4.1.0.cs @@ -16,10 +16,6 @@ public class WebSocketTests : ConditionalWcfTest { [Fact] [OuterLoop] -#if FULLXUNIT_NOTSUPPORTED -#else - [ActiveIssue(420, PlatformID.AnyUnix)] -#endif public static void WebSocket_Http_RequestReply_BinaryStreamed() { NetHttpBinding binding = null; @@ -83,8 +79,6 @@ public static void WebSocket_Http_RequestReply_BinaryStreamed() [OuterLoop] #if FULLXUNIT_NOTSUPPORTED [ActiveIssue(526)] -#else - [ActiveIssue(420, PlatformID.AnyUnix)] #endif public static void WebSocket_Http_Duplex_BinaryStreamed() { @@ -181,7 +175,6 @@ public static void WebSocket_Http_Duplex_BinaryStreamed() [ActiveIssue(526)] #else [ConditionalFact(nameof(Root_Certificate_Installed))] - [ActiveIssue(420, PlatformID.AnyUnix)] #endif public static void WebSocket_Https_Duplex_BinaryStreamed() { @@ -291,7 +284,6 @@ public static void WebSocket_Https_Duplex_BinaryStreamed() [ActiveIssue(526)] #else [ActiveIssue(470)] - [ActiveIssue(420, PlatformID.AnyUnix)] #endif public static void WebSocket_Https_Duplex_TextStreamed() { @@ -389,8 +381,6 @@ public static void WebSocket_Https_Duplex_TextStreamed() [OuterLoop] #if FULLXUNIT_NOTSUPPORTED [ActiveIssue(526)] -#else - [ActiveIssue(420, PlatformID.AnyUnix)] #endif public static void WebSocket_Http_Duplex_TextStreamed() { @@ -483,10 +473,6 @@ public static void WebSocket_Http_Duplex_TextStreamed() [Fact] [OuterLoop] -#if FULLXUNIT_NOTSUPPORTED -#else - [ActiveIssue(420, PlatformID.AnyUnix)] -#endif public static void WebSocket_Http_RequestReply_TextStreamed() { NetHttpBinding binding = null; @@ -548,10 +534,6 @@ public static void WebSocket_Http_RequestReply_TextStreamed() [Fact] [OuterLoop] -#if FULLXUNIT_NOTSUPPORTED -#else - [ActiveIssue(420, PlatformID.AnyUnix)] -#endif public static void WebSocket_Http_WSTransportUsageDefault_DuplexCallback_GuidRoundtrip() { DuplexChannelFactory factory = null; @@ -591,10 +573,6 @@ public static void WebSocket_Http_WSTransportUsageDefault_DuplexCallback_GuidRou [Fact] [OuterLoop] -#if FULLXUNIT_NOTSUPPORTED -#else - [ActiveIssue(420, PlatformID.AnyUnix)] -#endif public static void WebSocket_Http_WSTransportUsageAlways_DuplexCallback_GuidRoundtrip() { DuplexChannelFactory factory = null; @@ -634,10 +612,6 @@ public static void WebSocket_Http_WSTransportUsageAlways_DuplexCallback_GuidRoun [Fact] [OuterLoop] -#if FULLXUNIT_NOTSUPPORTED -#else - [ActiveIssue(420, PlatformID.AnyUnix)] -#endif public static void WebSocket_WSScheme_WSTransportUsageAlways_DuplexCallback_GuidRoundtrip() { DuplexChannelFactory factory = null; @@ -685,7 +659,6 @@ public static void WebSocket_WSScheme_WSTransportUsageAlways_DuplexCallback_Guid [ActiveIssue(526)] #else [ConditionalFact(nameof(Root_Certificate_Installed))] - [ActiveIssue(625, PlatformID.AnyUnix)] #endif public static void WebSocket_Https_RequestReply_BinaryBuffered() { @@ -751,7 +724,6 @@ public static void WebSocket_Https_RequestReply_BinaryBuffered() [ActiveIssue(526)] #else [ConditionalFact(nameof(Root_Certificate_Installed))] - [ActiveIssue(625, PlatformID.AnyUnix)] #endif public static void WebSocket_Https_RequestReply_TextBuffered_KeepAlive() { @@ -819,7 +791,6 @@ public static void WebSocket_Https_RequestReply_TextBuffered_KeepAlive() [ActiveIssue(526)] #else [ConditionalFact(nameof(Root_Certificate_Installed))] - [ActiveIssue(625, PlatformID.AnyUnix)] #endif public static void WebSocket_Https_Duplex_BinaryBuffered() { @@ -900,7 +871,6 @@ public static void WebSocket_Https_Duplex_BinaryBuffered() [ActiveIssue(526)] #else [ConditionalFact(nameof(Root_Certificate_Installed))] - [ActiveIssue(625, PlatformID.AnyUnix)] #endif public static void WebSocket_Https_Duplex_TextBuffered_KeepAlive() { @@ -976,25 +946,12 @@ public static void WebSocket_Https_Duplex_TextBuffered_KeepAlive() } [OuterLoop] -#if FULLXUNIT_NOTSUPPORTED [Fact] +#if FULLXUNIT_NOTSUPPORTED [ActiveIssue(526)] -#else - [ConditionalFact(nameof(Root_Certificate_Installed))] - [ActiveIssue(625, PlatformID.AnyUnix)] #endif public static void WebSocket_Http_RequestReply_TextBuffered() { -#if FULLXUNIT_NOTSUPPORTED - bool root_Certificate_Installed = Root_Certificate_Installed(); - if (!root_Certificate_Installed) - { - Console.WriteLine("---- Test SKIPPED --------------"); - Console.WriteLine("Attempting to run the test in ToF, a ConditionalFact evaluated as FALSE."); - Console.WriteLine("Root_Certificate_Installed evaluated as {0}", root_Certificate_Installed); - return; - } -#endif NetHttpBinding binding = null; ChannelFactory channelFactory = null; IWSRequestReplyService client = null; @@ -1040,25 +997,12 @@ public static void WebSocket_Http_RequestReply_TextBuffered() } [OuterLoop] -#if FULLXUNIT_NOTSUPPORTED [Fact] +#if FULLXUNIT_NOTSUPPORTED [ActiveIssue(526)] -#else - [ConditionalFact(nameof(Root_Certificate_Installed))] - [ActiveIssue(625, PlatformID.AnyUnix)] #endif public static void WebSocket_Http_RequestReply_BinaryBuffered_KeepAlive() { -#if FULLXUNIT_NOTSUPPORTED - bool root_Certificate_Installed = Root_Certificate_Installed(); - if (!root_Certificate_Installed) - { - Console.WriteLine("---- Test SKIPPED --------------"); - Console.WriteLine("Attempting to run the test in ToF, a ConditionalFact evaluated as FALSE."); - Console.WriteLine("Root_Certificate_Installed evaluated as {0}", root_Certificate_Installed); - return; - } -#endif NetHttpBinding binding = null; ChannelFactory channelFactory = null; IWSRequestReplyService client = null; @@ -1105,25 +1049,12 @@ public static void WebSocket_Http_RequestReply_BinaryBuffered_KeepAlive() } [OuterLoop] -#if FULLXUNIT_NOTSUPPORTED [Fact] +#if FULLXUNIT_NOTSUPPORTED [ActiveIssue(526)] -#else - [ConditionalFact(nameof(Root_Certificate_Installed))] - [ActiveIssue(625, PlatformID.AnyUnix)] #endif public static void WebSocket_Http_Duplex_TextBuffered_KeepAlive() { -#if FULLXUNIT_NOTSUPPORTED - bool root_Certificate_Installed = Root_Certificate_Installed(); - if (!root_Certificate_Installed) - { - Console.WriteLine("---- Test SKIPPED --------------"); - Console.WriteLine("Attempting to run the test in ToF, a ConditionalFact evaluated as FALSE."); - Console.WriteLine("Root_Certificate_Installed evaluated as {0}", root_Certificate_Installed); - return; - } -#endif NetHttpBinding binding = null; ClientReceiver clientReceiver = null; InstanceContext context = null; @@ -1183,25 +1114,12 @@ public static void WebSocket_Http_Duplex_TextBuffered_KeepAlive() } [OuterLoop] -#if FULLXUNIT_NOTSUPPORTED [Fact] +#if FULLXUNIT_NOTSUPPORTED [ActiveIssue(526)] -#else - [ConditionalFact(nameof(Root_Certificate_Installed))] - [ActiveIssue(625, PlatformID.AnyUnix)] #endif public static void WebSocket_Http_Duplex_BinaryBuffered() { -#if FULLXUNIT_NOTSUPPORTED - bool root_Certificate_Installed = Root_Certificate_Installed(); - if (!root_Certificate_Installed) - { - Console.WriteLine("---- Test SKIPPED --------------"); - Console.WriteLine("Attempting to run the test in ToF, a ConditionalFact evaluated as FALSE."); - Console.WriteLine("Root_Certificate_Installed evaluated as {0}", root_Certificate_Installed); - return; - } -#endif NetHttpBinding binding = null; ClientReceiver clientReceiver = null; InstanceContext context = null; @@ -1263,25 +1181,12 @@ public static void WebSocket_Http_Duplex_BinaryBuffered() // When not using a callback you can still force WCF to use WebSockets. // This test verifies that it actually uses WebSockets when not using a callback. [OuterLoop] -#if FULLXUNIT_NOTSUPPORTED [Fact] +#if FULLXUNIT_NOTSUPPORTED [ActiveIssue(526)] -#else - [ConditionalFact(nameof(Root_Certificate_Installed))] - [ActiveIssue(625, PlatformID.AnyUnix)] #endif public static void WebSocket_Http_VerifyWebSocketsUsed() { -#if FULLXUNIT_NOTSUPPORTED - bool root_Certificate_Installed = Root_Certificate_Installed(); - if (!root_Certificate_Installed) - { - Console.WriteLine("---- Test SKIPPED --------------"); - Console.WriteLine("Attempting to run the test in ToF, a ConditionalFact evaluated as FALSE."); - Console.WriteLine("Root_Certificate_Installed evaluated as {0}", root_Certificate_Installed); - return; - } -#endif NetHttpBinding binding = null; ChannelFactory channelFactory = null; IVerifyWebSockets client = null;