Skip some tests on Mono to prevent CI hangs.

This commit is contained in:
Cesar Blum Silveira 2015-11-11 05:41:28 -08:00
parent 52fe469688
commit dd1ffa5f84
9 changed files with 169 additions and 45 deletions

View File

@ -1,5 +1,10 @@
language: csharp language: csharp
sudo: false sudo: required
dist: trusty
addons:
apt:
packages:
- libunwind8
install: install:
- curl -sSL https://github.com/libuv/libuv/archive/v1.4.2.tar.gz | tar zxfv - -C /tmp && cd /tmp/libuv-1.4.2/ - curl -sSL https://github.com/libuv/libuv/archive/v1.4.2.tar.gz | tar zxfv - -C /tmp && cd /tmp/libuv-1.4.2/
- sh autogen.sh - sh autogen.sh
@ -9,4 +14,5 @@ install:
- export LD_LIBRARY_PATH="$HOME/libuvinstall/lib" - export LD_LIBRARY_PATH="$HOME/libuvinstall/lib"
- cd $OLDPWD - cd $OLDPWD
script: script:
- export KOREBUILD_TEST_DNXCORE=1
- ./build.sh --quiet verify - ./build.sh --quiet verify

View File

@ -8,6 +8,7 @@ using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Http.Extensions; using Microsoft.AspNet.Http.Extensions;
using Microsoft.AspNet.Testing.xunit;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Xunit; using Xunit;
@ -15,7 +16,21 @@ namespace Microsoft.AspNet.Server.Kestrel.FunctionalTests
{ {
public class AddressRegistrationTests public class AddressRegistrationTests
{ {
[Theory, MemberData(nameof(AddressRegistrationData))] [ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv4))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task RegisterAddresses_IPv4_Success(string addressInput, string[] testUrls)
{
await RegisterAddresses_Success(addressInput, testUrls);
}
[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
[IPv6SupportedCondition]
public async Task RegisterAddresses_IPv6_Success(string addressInput, string[] testUrls)
{
await RegisterAddresses_Success(addressInput, testUrls);
}
public async Task RegisterAddresses_Success(string addressInput, string[] testUrls) public async Task RegisterAddresses_Success(string addressInput, string[] testUrls)
{ {
var config = new ConfigurationBuilder() var config = new ConfigurationBuilder()
@ -42,22 +57,32 @@ namespace Microsoft.AspNet.Server.Kestrel.FunctionalTests
} }
} }
public static TheoryData<string, string[]> AddressRegistrationData public static TheoryData<string, string[]> AddressRegistrationDataIPv4
{ {
get get
{ {
var dataset = new TheoryData<string, string[]>(); var dataset = new TheoryData<string, string[]>();
dataset.Add("8787", new[] { "http://localhost:8787/" }); dataset.Add("8787", new[] { "http://localhost:8787/" });
dataset.Add("8787;8788", new[] { "http://localhost:8787/", "http://localhost:8788/" }); dataset.Add("8787;8788", new[] { "http://localhost:8787/", "http://localhost:8788/" });
dataset.Add("http://127.0.0.1:8787/", new[] { "http://127.0.0.1:8787/", });
dataset.Add("http://localhost:8787/base/path", new[] { "http://localhost:8787/base/path" });
return dataset;
}
}
public static TheoryData<string, string[]> AddressRegistrationDataIPv6
{
get
{
var dataset = new TheoryData<string, string[]>();
dataset.Add("http://*:8787/", new[] { "http://localhost:8787/", "http://127.0.0.1:8787/", "http://[::1]:8787/" }); dataset.Add("http://*:8787/", new[] { "http://localhost:8787/", "http://127.0.0.1:8787/", "http://[::1]:8787/" });
dataset.Add("http://localhost:8787/", new[] { "http://localhost:8787/", "http://127.0.0.1:8787/", dataset.Add("http://localhost:8787/", new[] { "http://localhost:8787/", "http://127.0.0.1:8787/",
/* // https://github.com/aspnet/KestrelHttpServer/issues/231 /* // https://github.com/aspnet/KestrelHttpServer/issues/231
"http://[::1]:8787/" "http://[::1]:8787/"
*/ }); */ });
dataset.Add("http://127.0.0.1:8787/", new[] { "http://127.0.0.1:8787/", });
dataset.Add("http://[::1]:8787/", new[] { "http://[::1]:8787/", }); dataset.Add("http://[::1]:8787/", new[] { "http://[::1]:8787/", });
dataset.Add("http://127.0.0.1:8787/;http://[::1]:8787/", new[] { "http://127.0.0.1:8787/", "http://[::1]:8787/" }); dataset.Add("http://127.0.0.1:8787/;http://[::1]:8787/", new[] { "http://127.0.0.1:8787/", "http://[::1]:8787/" });
dataset.Add("http://localhost:8787/base/path", new[] { "http://localhost:8787/base/path" });
return dataset; return dataset;
} }

View File

@ -0,0 +1,48 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Net;
using System.Net.Sockets;
using Microsoft.AspNet.Testing.xunit;
namespace Microsoft.AspNet.Server.Kestrel.FunctionalTests
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class IPv6SupportedConditionAttribute : Attribute, ITestCondition
{
private static Lazy<bool> _ipv6Supported = new Lazy<bool>(CanBindToIPv6Address);
public bool IsMet
{
get
{
return _ipv6Supported.Value;
}
}
public string SkipReason
{
get
{
return "IPv6 not supported on the host.";
}
}
private static bool CanBindToIPv6Address()
{
try
{
using (var socket = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp))
{
socket.Bind(new IPEndPoint(IPAddress.IPv6Loopback, 8787));
return true;
}
}
catch (SocketException)
{
return false;
}
}
}
}

View File

@ -8,6 +8,7 @@ using System.Threading.Tasks;
using Microsoft.AspNet.Builder; using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.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 +18,8 @@ namespace Microsoft.AspNet.Server.Kestrel.FunctionalTests
{ {
public class RequestTests public class RequestTests
{ {
[Fact] [ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task LargeUpload() public async Task LargeUpload()
{ {
var config = new ConfigurationBuilder() var config = new ConfigurationBuilder()
@ -69,15 +71,18 @@ namespace Microsoft.AspNet.Server.Kestrel.FunctionalTests
} }
} }
[Theory] [ConditionalTheory]
[InlineData("127.0.0.1", "127.0.0.1", "8792")] [InlineData("127.0.0.1", "127.0.0.1", "8792")]
[InlineData("localhost", "127.0.0.1", "8792")] [InlineData("localhost", "127.0.0.1", "8792")]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public Task RemoteIPv4Address(string requestAddress, string expectAddress, string port) public Task RemoteIPv4Address(string requestAddress, string expectAddress, string port)
{ {
return TestRemoteIPAddress("localhost", requestAddress, expectAddress, port); return TestRemoteIPAddress("localhost", requestAddress, expectAddress, port);
} }
[Fact] [ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
[IPv6SupportedCondition]
public Task RemoteIPv6Address() public Task RemoteIPv6Address()
{ {
return TestRemoteIPAddress("[::1]", "[::1]", "::1", "8792"); return TestRemoteIPAddress("[::1]", "[::1]", "::1", "8792");

View File

@ -6,6 +6,7 @@ using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Builder; using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Testing.xunit;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Xunit; using Xunit;
@ -13,7 +14,8 @@ namespace Microsoft.AspNet.Server.Kestrel.FunctionalTests
{ {
public class ResponseTests public class ResponseTests
{ {
[Fact] [ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on mono.")]
public async Task LargeDownload() public async Task LargeDownload()
{ {
var config = new ConfigurationBuilder() var config = new ConfigurationBuilder()

View File

@ -3,7 +3,9 @@
"dependencies": { "dependencies": {
"Microsoft.AspNet.Http.Abstractions": "1.0.0-*", "Microsoft.AspNet.Http.Abstractions": "1.0.0-*",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-*", "Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNet.Testing": "1.0.0-*",
"System.Net.Http": "4.0.1-*", "System.Net.Http": "4.0.1-*",
"System.Net.NameResolution": "4.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*" "xunit.runner.aspnet": "2.0.0-aspnet-*"
}, },
"frameworks": { "frameworks": {

View File

@ -4,13 +4,15 @@
using System; using System;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Testing.xunit;
using Xunit; using Xunit;
namespace Microsoft.AspNet.Server.KestrelTests namespace Microsoft.AspNet.Server.KestrelTests
{ {
public class ChunkedResponseTests public class ChunkedResponseTests
{ {
[Fact] [ConditionalFact]
[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 =>
@ -42,7 +44,8 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Fact] [ConditionalFact]
[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 =>
@ -75,7 +78,8 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Fact] [ConditionalFact]
[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 =>
@ -102,7 +106,8 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Fact] [ConditionalFact]
[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 =>
@ -132,7 +137,8 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Fact] [ConditionalFact]
[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 =>

View File

@ -3,9 +3,10 @@
using System.IO; using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Server.Kestrel.Filter;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Http.Features; using Microsoft.AspNet.Http.Features;
using Microsoft.AspNet.Server.Kestrel.Filter;
using Microsoft.AspNet.Testing.xunit;
using Xunit; using Xunit;
namespace Microsoft.AspNet.Server.KestrelTests namespace Microsoft.AspNet.Server.KestrelTests
@ -29,7 +30,8 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Fact] [ConditionalFact]
[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,7 +57,8 @@ namespace Microsoft.AspNet.Server.KestrelTests
Assert.Equal(sendString.Length, filter.BytesRead); Assert.Equal(sendString.Length, filter.BytesRead);
} }
[Fact] [ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public async Task CanReadAndWriteWithAsyncConnectionFilter() public async Task CanReadAndWriteWithAsyncConnectionFilter()
{ {
var serviceContext = new TestServiceContext() var serviceContext = new TestServiceContext()

View File

@ -10,6 +10,7 @@ using System.Threading.Tasks;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Server.Kestrel; using Microsoft.AspNet.Server.Kestrel;
using Microsoft.AspNet.Server.Kestrel.Filter; using Microsoft.AspNet.Server.Kestrel.Filter;
using Microsoft.AspNet.Testing.xunit;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Xunit; using Xunit;
@ -75,8 +76,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
return Task.FromResult<object>(null); return Task.FromResult<object>(null);
} }
[Theory] [ConditionalTheory]
[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);
@ -84,8 +86,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
engine.Dispose(); engine.Dispose();
} }
[Theory] [ConditionalTheory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public void ListenerCanCreateAndDispose(ServiceContext testContext) public void ListenerCanCreateAndDispose(ServiceContext testContext)
{ {
var engine = new KestrelEngine(testContext); var engine = new KestrelEngine(testContext);
@ -96,8 +99,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
engine.Dispose(); engine.Dispose();
} }
[Theory] [ConditionalTheory]
[MemberData(nameof(ConnectionFilterData))] [MemberData(nameof(ConnectionFilterData))]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")]
public void ConnectionCanReadAndWrite(ServiceContext testContext) public void ConnectionCanReadAndWrite(ServiceContext testContext)
{ {
var engine = new KestrelEngine(testContext); var engine = new KestrelEngine(testContext);
@ -122,8 +126,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
[Theory] [ConditionalTheory]
[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))
@ -143,8 +148,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
[Theory] [ConditionalTheory]
[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))
@ -171,8 +177,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -192,8 +199,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -213,8 +221,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -242,8 +251,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -272,8 +282,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -303,8 +314,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -335,8 +347,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -361,8 +374,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -385,8 +399,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -413,8 +428,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -447,8 +463,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -467,8 +484,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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 =>
@ -520,8 +538,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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;
@ -577,8 +596,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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;
@ -619,8 +639,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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;
@ -661,8 +682,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -688,8 +710,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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))
@ -730,8 +753,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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;
@ -803,7 +827,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[ConditionalTheory]
[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;
@ -852,8 +878,9 @@ namespace Microsoft.AspNet.Server.KestrelTests
} }
} }
[Theory] [ConditionalTheory]
[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 =>