Skip to content

Commit

Permalink
Merge pull request #1396 from mconnew/UnixWebSockets
Browse files Browse the repository at this point in the history
Use WebSockets pkg version supported on unix and enable tests

Fixes #625 
Fixes #420
  • Loading branch information
mconnew authored Jul 26, 2016
2 parents 05b0500 + 60f8ddb commit fb32131
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 101 deletions.
1 change: 1 addition & 0 deletions src/Common/test-runtime/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion src/System.Private.ServiceModel/src/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
{
Expand Down Expand Up @@ -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()
{
Expand Down Expand Up @@ -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()
{
Expand Down Expand Up @@ -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()
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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<IWcfDuplexService> factory = null;
Expand Down Expand Up @@ -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<IWcfDuplexService> factory = null;
Expand Down Expand Up @@ -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<IWcfDuplexService> factory = null;
Expand Down Expand Up @@ -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()
{
Expand Down Expand Up @@ -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()
{
Expand Down Expand Up @@ -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()
{
Expand Down Expand Up @@ -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()
{
Expand Down Expand Up @@ -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<IWSRequestReplyService> channelFactory = null;
IWSRequestReplyService client = null;
Expand Down Expand Up @@ -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<IWSRequestReplyService> channelFactory = null;
IWSRequestReplyService client = null;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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<IVerifyWebSockets> channelFactory = null;
IVerifyWebSockets client = null;
Expand Down

0 comments on commit fb32131

Please sign in to comment.