Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 15ba506

Browse files
authored
Skip connection reset tests on macOS in 2.1 (#2942)
1 parent e5b2b68 commit 15ba506

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

test/Kestrel.FunctionalTests/HttpsTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using Microsoft.AspNetCore.Server.Kestrel.Https;
1919
using Microsoft.AspNetCore.Server.Kestrel.Https.Internal;
2020
using Microsoft.AspNetCore.Testing;
21+
using Microsoft.AspNetCore.Testing.xunit;
2122
using Microsoft.Extensions.DependencyInjection;
2223
using Microsoft.Extensions.Logging;
2324
using Microsoft.Extensions.Logging.Abstractions.Internal;
@@ -331,7 +332,8 @@ await sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
331332
}
332333

333334
// Regression test for https://github.com/aspnet/KestrelHttpServer/pull/1197
334-
[Fact]
335+
[ConditionalFact]
336+
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")]
335337
public void ConnectionFilterDoesNotLeakBlock()
336338
{
337339
var loggerProvider = new HandshakeErrorLoggerProvider();

test/Kestrel.FunctionalTests/RequestTests.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ public void CanUpgradeRequestWithConnectionKeepAliveUpgradeHeader()
264264
Assert.True(dataRead);
265265
}
266266

267-
[Fact]
267+
[ConditionalFact]
268+
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")]
268269
public async Task ConnectionResetPriorToRequestIsLoggedAsDebug()
269270
{
270271
var connectionStarted = new SemaphoreSlim(0);
@@ -325,7 +326,8 @@ public async Task ConnectionResetPriorToRequestIsLoggedAsDebug()
325326
Assert.False(loggedHigherThanDebug);
326327
}
327328

328-
[Fact]
329+
[ConditionalFact]
330+
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")]
329331
public async Task ConnectionResetBetweenRequestsIsLoggedAsDebug()
330332
{
331333
var connectionReset = new SemaphoreSlim(0);
@@ -394,7 +396,8 @@ await connection.Receive(
394396
Assert.False(loggedHigherThanDebug);
395397
}
396398

397-
[Fact]
399+
[ConditionalFact]
400+
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")]
398401
public async Task ConnectionResetMidRequestIsLoggedAsDebug()
399402
{
400403
var requestStarted = new SemaphoreSlim(0);
@@ -463,7 +466,8 @@ public async Task ConnectionResetMidRequestIsLoggedAsDebug()
463466
Assert.False(loggedHigherThanDebug, "Logged event should not have been higher than debug.");
464467
}
465468

466-
[Fact]
469+
[ConditionalFact]
470+
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")]
467471
public async Task ThrowsOnReadAfterConnectionError()
468472
{
469473
var requestStarted = new SemaphoreSlim(0);
@@ -1305,7 +1309,8 @@ await connection.Send(
13051309
mockKestrelTrace.Verify(t => t.ConnectionStop(It.IsAny<string>()), Times.AtMostOnce());
13061310
}
13071311

1308-
[Theory]
1312+
[ConditionalTheory]
1313+
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")]
13091314
[MemberData(nameof(ConnectionAdapterData))]
13101315
public async Task AppCanHandleClientAbortingConnectionMidRequest(ListenOptions listenOptions)
13111316
{

test/Kestrel.FunctionalTests/ResponseTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
using Microsoft.AspNetCore.Server.Kestrel.Https;
2828
using Microsoft.AspNetCore.Server.Kestrel.Https.Internal;
2929
using Microsoft.AspNetCore.Testing;
30+
using Microsoft.AspNetCore.Testing.xunit;
3031
using Microsoft.Extensions.DependencyInjection;
3132
using Microsoft.Extensions.Logging;
3233
using Microsoft.Extensions.Logging.Testing;
@@ -2431,7 +2432,8 @@ await connection.Send(
24312432
Assert.True(requestAborted);
24322433
}
24332434

2434-
[Theory]
2435+
[ConditionalTheory]
2436+
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")]
24352437
[MemberData(nameof(ConnectionAdapterData))]
24362438
public async Task AppCanHandleClientAbortingConnectionMidResponse(ListenOptions listenOptions)
24372439
{
@@ -2504,7 +2506,8 @@ await connection.Send(
25042506
Assert.Empty(transportLogs.Where(w => w.LogLevel > LogLevel.Debug));
25052507
}
25062508

2507-
[Theory]
2509+
[ConditionalTheory]
2510+
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "macOS EPIPE vs. EPROTOTYPE bug https://github.com/aspnet/KestrelHttpServer/issues/2885")]
25082511
[MemberData(nameof(ConnectionAdapterData))]
25092512
public async Task ClientAbortingConnectionImmediatelyIsNotLoggedHigherThanDebug(ListenOptions listenOptions)
25102513
{

0 commit comments

Comments
 (0)