diff --git a/test/Microsoft.Net.Http.Server.FunctionalTests/OpaqueUpgradeTests.cs b/test/Microsoft.Net.Http.Server.FunctionalTests/OpaqueUpgradeTests.cs index d6dc580fc2..9d3d0553ec 100644 --- a/test/Microsoft.Net.Http.Server.FunctionalTests/OpaqueUpgradeTests.cs +++ b/test/Microsoft.Net.Http.Server.FunctionalTests/OpaqueUpgradeTests.cs @@ -6,13 +6,15 @@ using System.Net.Http; using System.Net.Sockets; using System.Text; using System.Threading.Tasks; +using Microsoft.AspNet.Testing.xunit; using Xunit; namespace Microsoft.Net.Http.Server { public class OpaqueUpgradeTests { - [Fact] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.Win7And2008R2)] public async Task OpaqueUpgrade_AfterHeadersSent_Throws() { string address; @@ -34,7 +36,8 @@ namespace Microsoft.Net.Http.Server } } - [Fact] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.Win7And2008R2)] public async Task OpaqueUpgrade_GetUpgrade_Success() { string address; @@ -55,7 +58,8 @@ namespace Microsoft.Net.Http.Server } } - [Theory] + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Win7And2008R2)] // See HTTP_VERB for known verbs [InlineData("UNKNOWN", null)] [InlineData("INVALID", null)] @@ -110,7 +114,8 @@ namespace Microsoft.Net.Http.Server } } - [Theory] + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Win7And2008R2)] // Http.Sys returns a 411 Length Required if PUT or POST does not specify content-length or chunked. [InlineData("POST", "Content-Length: 10")] [InlineData("POST", "Transfer-Encoding: chunked")] diff --git a/test/Microsoft.Net.Http.Server.FunctionalTests/WebSocketTests.cs b/test/Microsoft.Net.Http.Server.FunctionalTests/WebSocketTests.cs index 54e5a2a16c..377bb51cbd 100644 --- a/test/Microsoft.Net.Http.Server.FunctionalTests/WebSocketTests.cs +++ b/test/Microsoft.Net.Http.Server.FunctionalTests/WebSocketTests.cs @@ -6,13 +6,15 @@ using System.Net.WebSockets; using System.Text; using System.Threading; using System.Threading.Tasks; +using Microsoft.AspNet.Testing.xunit; using Xunit; namespace Microsoft.Net.Http.Server { public class WebSocketTests { - [Fact] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.Win7And2008R2)] public async Task WebSocketAccept_AfterHeadersSent_Throws() { string address; @@ -33,7 +35,8 @@ namespace Microsoft.Net.Http.Server } } - [Fact] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.Win7And2008R2)] public async Task WebSocketAccept_Success() { string address; @@ -50,7 +53,8 @@ namespace Microsoft.Net.Http.Server } } - [Fact] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.Win7And2008R2)] public async Task WebSocketAccept_SendAndReceive_Success() { string address; diff --git a/test/Microsoft.Net.Http.Server.FunctionalTests/project.json b/test/Microsoft.Net.Http.Server.FunctionalTests/project.json index f9236d56fc..f0db29a06c 100644 --- a/test/Microsoft.Net.Http.Server.FunctionalTests/project.json +++ b/test/Microsoft.Net.Http.Server.FunctionalTests/project.json @@ -4,6 +4,7 @@ }, "dependencies": { "Microsoft.Net.Http.Server": "1.0.0-*", + "Microsoft.AspNet.Testing": "1.0.0-*", "xunit.runner.kre": "1.0.0-*" }, "frameworks": {