diff --git a/test/Kestrel.FunctionalTests/HttpsTests.cs b/test/Kestrel.FunctionalTests/HttpsTests.cs index b1cc95b24af9b3c0b073a8f93bec5b555822e30e..9de8a29b48b7bc21f79026594cd28e8cae8810ec 100644 --- a/test/Kestrel.FunctionalTests/HttpsTests.cs +++ b/test/Kestrel.FunctionalTests/HttpsTests.cs @@ -18,6 +18,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.AspNetCore.Server.Kestrel.Https; using Microsoft.AspNetCore.Server.Kestrel.Https.Internal; using Microsoft.AspNetCore.Testing; +using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions.Internal; @@ -331,7 +332,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests } // Regression test for https://github.com/aspnet/KestrelHttpServer/pull/1197 - [Fact] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")] public void ConnectionFilterDoesNotLeakBlock() { var loggerProvider = new HandshakeErrorLoggerProvider(); diff --git a/test/Kestrel.FunctionalTests/RequestTests.cs b/test/Kestrel.FunctionalTests/RequestTests.cs index d0fe27627328824cc6ec29619c8cdda22c08ea88..b528e80b3a953f885b2545f06958cf8f8964900a 100644 --- a/test/Kestrel.FunctionalTests/RequestTests.cs +++ b/test/Kestrel.FunctionalTests/RequestTests.cs @@ -264,7 +264,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests Assert.True(dataRead); } - [Fact] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")] public async Task ConnectionResetPriorToRequestIsLoggedAsDebug() { var connectionStarted = new SemaphoreSlim(0); @@ -325,7 +326,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests Assert.False(loggedHigherThanDebug); } - [Fact] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")] public async Task ConnectionResetBetweenRequestsIsLoggedAsDebug() { var connectionReset = new SemaphoreSlim(0); @@ -394,7 +396,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests Assert.False(loggedHigherThanDebug); } - [Fact] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")] public async Task ConnectionResetMidRequestIsLoggedAsDebug() { var requestStarted = new SemaphoreSlim(0); @@ -463,7 +466,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests Assert.False(loggedHigherThanDebug, "Logged event should not have been higher than debug."); } - [Fact] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")] public async Task ThrowsOnReadAfterConnectionError() { var requestStarted = new SemaphoreSlim(0); @@ -1305,7 +1309,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests mockKestrelTrace.Verify(t => t.ConnectionStop(It.IsAny<string>()), Times.AtMostOnce()); } - [Theory] + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")] [MemberData(nameof(ConnectionAdapterData))] public async Task AppCanHandleClientAbortingConnectionMidRequest(ListenOptions listenOptions) { diff --git a/test/Kestrel.FunctionalTests/ResponseTests.cs b/test/Kestrel.FunctionalTests/ResponseTests.cs index 5763a54a5b5793e148fea8be77cfceade66c00b9..39b6725ee33c18994fce85fa084c66291a442d89 100644 --- a/test/Kestrel.FunctionalTests/ResponseTests.cs +++ b/test/Kestrel.FunctionalTests/ResponseTests.cs @@ -27,6 +27,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.Server.Kestrel.Https; using Microsoft.AspNetCore.Server.Kestrel.Https.Internal; using Microsoft.AspNetCore.Testing; +using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; @@ -2431,7 +2432,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests Assert.True(requestAborted); } - [Theory] + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")] [MemberData(nameof(ConnectionAdapterData))] public async Task AppCanHandleClientAbortingConnectionMidResponse(ListenOptions listenOptions) { @@ -2504,7 +2506,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests Assert.Empty(transportLogs.Where(w => w.LogLevel > LogLevel.Debug)); } - [Theory] + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")] [MemberData(nameof(ConnectionAdapterData))] public async Task ClientAbortingConnectionImmediatelyIsNotLoggedHigherThanDebug(ListenOptions listenOptions) {