Remove FrameworkSkipConditions for Mono

- Maybe things are better now with graceful shutdown *crosses fingers*
This commit is contained in:
Stephen Halter 2016-02-10 15:46:29 -08:00
parent 53ecef0f98
commit 04736e1d09
7 changed files with 53 additions and 111 deletions

View File

@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Xunit; using Xunit;
@ -16,15 +15,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
{ {
public class AddressRegistrationTests public class AddressRegistrationTests
{ {
[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv4))] [Theory, MemberData(nameof(AddressRegistrationDataIPv4))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task RegisterAddresses_IPv4_Success(string addressInput, string[] testUrls) public async Task RegisterAddresses_IPv4_Success(string addressInput, string[] testUrls)
{ {
await RegisterAddresses_Success(addressInput, testUrls); await RegisterAddresses_Success(addressInput, testUrls);
} }
[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6))] [Theory, MemberData(nameof(AddressRegistrationDataIPv6))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
[IPv6SupportedCondition] [IPv6SupportedCondition]
public async Task RegisterAddresses_IPv6_Success(string addressInput, string[] testUrls) public async Task RegisterAddresses_IPv6_Success(string addressInput, string[] testUrls)
{ {

View File

@ -7,7 +7,6 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
@ -17,7 +16,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
{ {
public class PathBaseTests public class PathBaseTests
{ {
[ConditionalTheory] [Theory]
[InlineData("/base", "/base", "/base", "")] [InlineData("/base", "/base", "/base", "")]
[InlineData("/base", "/base/", "/base", "/")] [InlineData("/base", "/base/", "/base", "/")]
[InlineData("/base", "/base/something", "/base", "/something")] [InlineData("/base", "/base/something", "/base", "/something")]
@ -25,13 +24,12 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
[InlineData("/base/more", "/base/more", "/base/more", "")] [InlineData("/base/more", "/base/more", "/base/more", "")]
[InlineData("/base/more", "/base/more/something", "/base/more", "/something")] [InlineData("/base/more", "/base/more/something", "/base/more", "/something")]
[InlineData("/base/more", "/base/more/something/", "/base/more", "/something/")] [InlineData("/base/more", "/base/more/something/", "/base/more", "/something/")]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public Task RequestPathBaseIsServerPathBase(string registerPathBase, string requestPath, string expectedPathBase, string expectedPath) public Task RequestPathBaseIsServerPathBase(string registerPathBase, string requestPath, string expectedPathBase, string expectedPath)
{ {
return TestPathBase(registerPathBase, requestPath, expectedPathBase, expectedPath); return TestPathBase(registerPathBase, requestPath, expectedPathBase, expectedPath);
} }
[ConditionalTheory] [Theory]
[InlineData("", "/", "", "/")] [InlineData("", "/", "", "/")]
[InlineData("", "/something", "", "/something")] [InlineData("", "/something", "", "/something")]
[InlineData("/", "/", "", "/")] [InlineData("/", "/", "", "/")]
@ -40,33 +38,29 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
[InlineData("/base", "/baseandsomething", "", "/baseandsomething")] [InlineData("/base", "/baseandsomething", "", "/baseandsomething")]
[InlineData("/base", "/ba", "", "/ba")] [InlineData("/base", "/ba", "", "/ba")]
[InlineData("/base", "/ba/se", "", "/ba/se")] [InlineData("/base", "/ba/se", "", "/ba/se")]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public Task DefaultPathBaseIsEmpty(string registerPathBase, string requestPath, string expectedPathBase, string expectedPath) public Task DefaultPathBaseIsEmpty(string registerPathBase, string requestPath, string expectedPathBase, string expectedPath)
{ {
return TestPathBase(registerPathBase, requestPath, expectedPathBase, expectedPath); return TestPathBase(registerPathBase, requestPath, expectedPathBase, expectedPath);
} }
[ConditionalTheory] [Theory]
[InlineData("", "/", "", "/")] [InlineData("", "/", "", "/")]
[InlineData("/", "/", "", "/")] [InlineData("/", "/", "", "/")]
[InlineData("/base", "/base/", "/base", "/")] [InlineData("/base", "/base/", "/base", "/")]
[InlineData("/base/", "/base", "/base", "")] [InlineData("/base/", "/base", "/base", "")]
[InlineData("/base/", "/base/", "/base", "/")] [InlineData("/base/", "/base/", "/base", "/")]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public Task PathBaseNeverEndsWithSlash(string registerPathBase, string requestPath, string expectedPathBase, string expectedPath) public Task PathBaseNeverEndsWithSlash(string registerPathBase, string requestPath, string expectedPathBase, string expectedPath)
{ {
return TestPathBase(registerPathBase, requestPath, expectedPathBase, expectedPath); return TestPathBase(registerPathBase, requestPath, expectedPathBase, expectedPath);
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public Task PathBaseAndPathPreserveRequestCasing() public Task PathBaseAndPathPreserveRequestCasing()
{ {
return TestPathBase("/base", "/Base/Something", "/Base", "/Something"); return TestPathBase("/base", "/Base/Something", "/Base", "/Something");
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public Task PathBaseCanHaveUTF8Characters() public Task PathBaseCanHaveUTF8Characters()
{ {
return TestPathBase("/b♫se", "/b♫se/something", "/b♫se", "/something"); return TestPathBase("/b♫se", "/b♫se/something", "/b♫se", "/something");

View File

@ -11,7 +11,6 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
@ -21,8 +20,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
{ {
public class RequestTests public class RequestTests
{ {
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task LargeUpload() public async Task LargeUpload()
{ {
var port = PortManager.GetPort(); var port = PortManager.GetPort();
@ -78,25 +76,22 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
} }
} }
[ConditionalTheory] [Theory]
[InlineData("127.0.0.1", "127.0.0.1")] [InlineData("127.0.0.1", "127.0.0.1")]
[InlineData("localhost", "127.0.0.1")] [InlineData("localhost", "127.0.0.1")]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public Task RemoteIPv4Address(string requestAddress, string expectAddress) public Task RemoteIPv4Address(string requestAddress, string expectAddress)
{ {
return TestRemoteIPAddress("localhost", requestAddress, expectAddress); return TestRemoteIPAddress("localhost", requestAddress, expectAddress);
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
[IPv6SupportedCondition] [IPv6SupportedCondition]
public Task RemoteIPv6Address() public Task RemoteIPv6Address()
{ {
return TestRemoteIPAddress("[::1]", "[::1]", "::1"); return TestRemoteIPAddress("[::1]", "[::1]", "::1");
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task DoesNotHangOnConnectionCloseRequest() public async Task DoesNotHangOnConnectionCloseRequest()
{ {
var port = PortManager.GetPort(); var port = PortManager.GetPort();
@ -130,8 +125,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
} }
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public void RequestPathIsNormalized() public void RequestPathIsNormalized()
{ {
var port = PortManager.GetPort(); var port = PortManager.GetPort();

View File

@ -10,7 +10,6 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;
using Xunit; using Xunit;
@ -19,8 +18,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
{ {
public class ResponseTests public class ResponseTests
{ {
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on mono.")]
public async Task LargeDownload() public async Task LargeDownload()
{ {
var port = PortManager.GetPort(); var port = PortManager.GetPort();
@ -80,8 +78,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
} }
} }
[ConditionalTheory, MemberData(nameof(NullHeaderData))] [Theory, MemberData(nameof(NullHeaderData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on mono.")]
public async Task IgnoreNullHeaderValues(string headerName, StringValues headerValue, string expectedValue) public async Task IgnoreNullHeaderValues(string headerName, StringValues headerValue, string expectedValue)
{ {
var port = PortManager.GetPort(); var port = PortManager.GetPort();
@ -129,8 +126,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
} }
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on mono.")]
public async Task OnCompleteCalledEvenWhenOnStartingNotCalled() public async Task OnCompleteCalledEvenWhenOnStartingNotCalled()
{ {
var port = PortManager.GetPort(); var port = PortManager.GetPort();

View File

@ -5,15 +5,13 @@ using System;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Testing.xunit;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Server.KestrelTests namespace Microsoft.AspNetCore.Server.KestrelTests
{ {
public class ChunkedResponseTests public class ChunkedResponseTests
{ {
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ResponsesAreChunkedAutomatically() public async Task ResponsesAreChunkedAutomatically()
{ {
using (var server = new TestServer(async httpContext => using (var server = new TestServer(async httpContext =>
@ -45,8 +43,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ZeroLengthWritesAreIgnored() public async Task ZeroLengthWritesAreIgnored()
{ {
using (var server = new TestServer(async httpContext => using (var server = new TestServer(async httpContext =>
@ -79,8 +76,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task EmptyResponseBodyHandledCorrectlyWithZeroLengthWrite() public async Task EmptyResponseBodyHandledCorrectlyWithZeroLengthWrite()
{ {
using (var server = new TestServer(async httpContext => using (var server = new TestServer(async httpContext =>
@ -107,8 +103,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ConnectionClosedIfExeptionThrownAfterWrite() public async Task ConnectionClosedIfExeptionThrownAfterWrite()
{ {
using (var server = new TestServer(async httpContext => using (var server = new TestServer(async httpContext =>
@ -138,8 +133,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ConnectionClosedIfExeptionThrownAfterZeroLengthWrite() public async Task ConnectionClosedIfExeptionThrownAfterZeroLengthWrite()
{ {
using (var server = new TestServer(async httpContext => using (var server = new TestServer(async httpContext =>
@ -168,8 +162,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task WritesAreFlushedPriorToResponseCompletion() public async Task WritesAreFlushedPriorToResponseCompletion()
{ {
var flushWh = new ManualResetEventSlim(); var flushWh = new ManualResetEventSlim();

View File

@ -6,7 +6,6 @@ using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Server.Kestrel.Filter; using Microsoft.AspNetCore.Server.Kestrel.Filter;
using Microsoft.AspNetCore.Testing.xunit;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Server.KestrelTests namespace Microsoft.AspNetCore.Server.KestrelTests
@ -30,8 +29,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task CanReadAndWriteWithRewritingConnectionFilter() public async Task CanReadAndWriteWithRewritingConnectionFilter()
{ {
var filter = new RewritingConnectionFilter(); var filter = new RewritingConnectionFilter();
@ -55,8 +53,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
Assert.Equal(sendString.Length, filter.BytesRead); Assert.Equal(sendString.Length, filter.BytesRead);
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task CanReadAndWriteWithAsyncConnectionFilter() public async Task CanReadAndWriteWithAsyncConnectionFilter()
{ {
var serviceContext = new TestServiceContext(new AsyncConnectionFilter()); var serviceContext = new TestServiceContext(new AsyncConnectionFilter());
@ -77,8 +74,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalFact] [Fact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ThrowingSynchronousConnectionFilterDoesNotCrashServer() public async Task ThrowingSynchronousConnectionFilterDoesNotCrashServer()
{ {
var serviceContext = new TestServiceContext(new ThrowingConnectionFilter()); var serviceContext = new TestServiceContext(new ThrowingConnectionFilter());

View File

@ -14,7 +14,6 @@ using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel; using Microsoft.AspNetCore.Server.Kestrel;
using Microsoft.AspNetCore.Server.Kestrel.Filter; using Microsoft.AspNetCore.Server.Kestrel.Filter;
using Microsoft.AspNetCore.Server.Kestrel.Infrastructure; using Microsoft.AspNetCore.Server.Kestrel.Infrastructure;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Xunit; using Xunit;
@ -77,9 +76,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
return Task.FromResult<object>(null); return Task.FromResult<object>(null);
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public void EngineCanStartAndStop(ServiceContext testContext) public void EngineCanStartAndStop(ServiceContext testContext)
{ {
var engine = new KestrelEngine(testContext); var engine = new KestrelEngine(testContext);
@ -87,9 +85,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
engine.Dispose(); engine.Dispose();
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public void ListenerCanCreateAndDispose(TestServiceContext testContext) public void ListenerCanCreateAndDispose(TestServiceContext testContext)
{ {
testContext.App = App; testContext.App = App;
@ -101,9 +98,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
engine.Dispose(); engine.Dispose();
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public void ConnectionCanReadAndWrite(TestServiceContext testContext) public void ConnectionCanReadAndWrite(TestServiceContext testContext)
{ {
var port = TestServer.GetNextPort(); var port = TestServer.GetNextPort();
@ -129,9 +125,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task Http10(ServiceContext testContext) public async Task Http10(ServiceContext testContext)
{ {
using (var server = new TestServer(App, testContext)) using (var server = new TestServer(App, testContext))
@ -151,9 +146,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task Http11(ServiceContext testContext) public async Task Http11(ServiceContext testContext)
{ {
using (var server = new TestServer(AppChunked, testContext)) using (var server = new TestServer(AppChunked, testContext))
@ -180,7 +174,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
public async Task ReuseStreamsOn(ServiceContext testContext) public async Task ReuseStreamsOn(ServiceContext testContext)
{ {
@ -223,7 +217,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
public async Task ReuseStreamsOff(ServiceContext testContext) public async Task ReuseStreamsOff(ServiceContext testContext)
{ {
@ -266,9 +260,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task Http10ContentLength(ServiceContext testContext) public async Task Http10ContentLength(ServiceContext testContext)
{ {
using (var server = new TestServer(App, testContext)) using (var server = new TestServer(App, testContext))
@ -288,9 +281,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task Http10TransferEncoding(ServiceContext testContext) public async Task Http10TransferEncoding(ServiceContext testContext)
{ {
using (var server = new TestServer(App, testContext)) using (var server = new TestServer(App, testContext))
@ -310,9 +302,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task Http10KeepAlive(ServiceContext testContext) public async Task Http10KeepAlive(ServiceContext testContext)
{ {
using (var server = new TestServer(AppChunked, testContext)) using (var server = new TestServer(AppChunked, testContext))
@ -340,9 +331,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task Http10KeepAliveNotUsedIfResponseContentLengthNotSet(ServiceContext testContext) public async Task Http10KeepAliveNotUsedIfResponseContentLengthNotSet(ServiceContext testContext)
{ {
using (var server = new TestServer(App, testContext)) using (var server = new TestServer(App, testContext))
@ -371,9 +361,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task Http10KeepAliveContentLength(ServiceContext testContext) public async Task Http10KeepAliveContentLength(ServiceContext testContext)
{ {
using (var server = new TestServer(AppChunked, testContext)) using (var server = new TestServer(AppChunked, testContext))
@ -403,9 +392,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task Http10KeepAliveTransferEncoding(ServiceContext testContext) public async Task Http10KeepAliveTransferEncoding(ServiceContext testContext)
{ {
using (var server = new TestServer(AppChunked, testContext)) using (var server = new TestServer(AppChunked, testContext))
@ -436,9 +424,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task Expect100ContinueForBody(ServiceContext testContext) public async Task Expect100ContinueForBody(ServiceContext testContext)
{ {
using (var server = new TestServer(AppChunked, testContext)) using (var server = new TestServer(AppChunked, testContext))
@ -463,9 +450,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task DisconnectingClient(ServiceContext testContext) public async Task DisconnectingClient(ServiceContext testContext)
{ {
using (var server = new TestServer(App, testContext)) using (var server = new TestServer(App, testContext))
@ -488,9 +474,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ZeroContentLengthSetAutomaticallyAfterNoWrites(ServiceContext testContext) public async Task ZeroContentLengthSetAutomaticallyAfterNoWrites(ServiceContext testContext)
{ {
using (var server = new TestServer(EmptyApp, testContext)) using (var server = new TestServer(EmptyApp, testContext))
@ -517,9 +502,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ZeroContentLengthNotSetAutomaticallyForNonKeepAliveRequests(ServiceContext testContext) public async Task ZeroContentLengthNotSetAutomaticallyForNonKeepAliveRequests(ServiceContext testContext)
{ {
using (var server = new TestServer(EmptyApp, testContext)) using (var server = new TestServer(EmptyApp, testContext))
@ -552,9 +536,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ZeroContentLengthNotSetAutomaticallyForHeadRequests(ServiceContext testContext) public async Task ZeroContentLengthNotSetAutomaticallyForHeadRequests(ServiceContext testContext)
{ {
using (var server = new TestServer(EmptyApp, testContext)) using (var server = new TestServer(EmptyApp, testContext))
@ -573,9 +556,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ZeroContentLengthNotSetAutomaticallyForCertainStatusCodes(ServiceContext testContext) public async Task ZeroContentLengthNotSetAutomaticallyForCertainStatusCodes(ServiceContext testContext)
{ {
using (var server = new TestServer(async httpContext => using (var server = new TestServer(async httpContext =>
@ -627,9 +609,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ThrowingResultsIn500Response(ServiceContext testContext) public async Task ThrowingResultsIn500Response(ServiceContext testContext)
{ {
bool onStartingCalled = false; bool onStartingCalled = false;
@ -686,9 +667,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ThrowingAfterWritingKillsConnection(ServiceContext testContext) public async Task ThrowingAfterWritingKillsConnection(ServiceContext testContext)
{ {
bool onStartingCalled = false; bool onStartingCalled = false;
@ -729,9 +709,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ThrowingAfterPartialWriteKillsConnection(ServiceContext testContext) public async Task ThrowingAfterPartialWriteKillsConnection(ServiceContext testContext)
{ {
bool onStartingCalled = false; bool onStartingCalled = false;
@ -772,9 +751,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ConnectionClosesWhenFinReceived(ServiceContext testContext) public async Task ConnectionClosesWhenFinReceived(ServiceContext testContext)
{ {
using (var server = new TestServer(AppChunked, testContext)) using (var server = new TestServer(AppChunked, testContext))
@ -800,9 +778,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ConnectionClosesWhenFinReceivedBeforeRequestCompletes(ServiceContext testContext) public async Task ConnectionClosesWhenFinReceivedBeforeRequestCompletes(ServiceContext testContext)
{ {
using (var server = new TestServer(AppChunked, testContext)) using (var server = new TestServer(AppChunked, testContext))
@ -843,9 +820,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ThrowingInOnStartingResultsInFailedWritesAnd500Response(ServiceContext testContext) public async Task ThrowingInOnStartingResultsInFailedWritesAnd500Response(ServiceContext testContext)
{ {
var onStartingCallCount1 = 0; var onStartingCallCount1 = 0;
@ -917,9 +893,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task ThrowingInOnCompletedIsLoggedAndClosesConnection(ServiceContext testContext) public async Task ThrowingInOnCompletedIsLoggedAndClosesConnection(ServiceContext testContext)
{ {
var onCompletedCalled1 = false; var onCompletedCalled1 = false;
@ -968,9 +943,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task RequestBodyIsConsumedAutomaticallyIfAppDoesntConsumeItFully(ServiceContext testContext) public async Task RequestBodyIsConsumedAutomaticallyIfAppDoesntConsumeItFully(ServiceContext testContext)
{ {
using (var server = new TestServer(async httpContext => using (var server = new TestServer(async httpContext =>
@ -1015,9 +989,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
} }
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task RequestsCanBeAbortedMidRead(ServiceContext testContext) public async Task RequestsCanBeAbortedMidRead(ServiceContext testContext)
{ {
var readTcs = new TaskCompletionSource<object>(); var readTcs = new TaskCompletionSource<object>();
@ -1088,9 +1061,8 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
Assert.Equal(2, abortedRequestId); Assert.Equal(2, abortedRequestId);
} }
[ConditionalTheory] [Theory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task FailedWritesResultInAbortedRequest(ServiceContext testContext) public async Task FailedWritesResultInAbortedRequest(ServiceContext testContext)
{ {
// This should match _maxBytesPreCompleted in SocketOutput // This should match _maxBytesPreCompleted in SocketOutput