Disable tests that hang on SslStream.WriteAsync after update to CoreFx 4.4.

This commit is contained in:
Cesar Blum Silveira 2016-12-22 18:37:14 -08:00
parent 5b8f7c2b2b
commit 973b705cdb
6 changed files with 23 additions and 20 deletions

View File

@ -14,7 +14,6 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.AspNetCore.Server.Kestrel.Internal.Networking;
using Microsoft.AspNetCore.Testing;
using Microsoft.AspNetCore.Testing.xunit;
using Xunit;
@ -23,7 +22,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
{
public class AddressRegistrationTests
{
[Theory, MemberData(nameof(AddressRegistrationDataIPv4))]
[Theory(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)"), MemberData(nameof(AddressRegistrationDataIPv4))]
public async Task RegisterAddresses_IPv4_Success(string addressInput, Func<IServerAddressesFeature, string[]> testUrls)
{
await RegisterAddresses_Success(addressInput, testUrls);
@ -36,14 +35,16 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
await RegisterAddresses_Success(addressInput, testUrls);
}
[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv4Port443))]
// SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)
//[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv4Port443))]
[PortSupportedCondition(443)]
public async Task RegisterAddresses_IPv4Port443_Success(string addressInput, Func<IServerAddressesFeature, string[]> testUrls)
{
await RegisterAddresses_Success(addressInput, testUrls);
}
[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6))]
// SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)
//[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6))]
[IPv6SupportedCondition]
public async Task RegisterAddresses_IPv6_Success(string addressInput, Func<IServerAddressesFeature, string[]> testUrls)
{
@ -58,7 +59,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
await RegisterAddresses_Success(addressInput, testUrls);
}
[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6Port443))]
// SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)
//[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6Port443))]
[IPv6SupportedCondition]
[PortSupportedCondition(443)]
public async Task RegisterAddresses_IPv6Port443_Success(string addressInput, Func<IServerAddressesFeature, string[]> testUrls)
@ -66,7 +68,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
await RegisterAddresses_Success(addressInput, testUrls);
}
[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6ScopeId))]
// SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)
//[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6ScopeId))]
[IPv6SupportedCondition]
public async Task RegisterAddresses_IPv6ScopeId_Success(string addressInput, Func<IServerAddressesFeature, string[]> testUrls)
{
@ -89,7 +92,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
foreach (var testUrl in testUrls(host.ServerFeatures.Get<IServerAddressesFeature>()))
{
var response = await HttpClientSlim.GetStringAsync(testUrl, validateCertificate: false);
var response = await HttpClientSlim.GetStringAsync(testUrl, validateCertificate: false).TimeoutAfter(TimeSpan.FromSeconds(2));
// Compare the response with Uri.ToString(), rather than testUrl directly.
// Required to handle IPv6 addresses with zone index, like "fe80::3%1"

View File

@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
}
}
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task GetStringAsyncHttps()
{
using (var host = StartHost(protocol: "https"))
@ -53,7 +53,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
}
}
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task PostAsyncHttps()
{
using (var host = StartHost(protocol: "https",

View File

@ -87,7 +87,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
}
// Regression test for https://github.com/aspnet/KestrelHttpServer/issues/1103#issuecomment-246971172
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task DoesNotThrowObjectDisposedExceptionOnConnectionAbort()
{
var x509Certificate2 = new X509Certificate2(@"TestResources/testCert.pfx", "testPassword");
@ -137,7 +137,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
Assert.False(loggerFactory.ErrorLogger.ObjectDisposedExceptionLogged);
}
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task DoesNotThrowObjectDisposedExceptionFromWriteAsyncAfterConnectionIsAborted()
{
var tcs = new TaskCompletionSource<object>();

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
{
public class LoggingConnectionFilterTests
{
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task LoggingConnectionFilterCanBeAddedBeforeAndAfterHttpsFilter()
{
var host = new WebHostBuilder()

View File

@ -65,7 +65,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
}
}
[Theory]
[Theory(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
[MemberData("LargeUploadData")]
public async Task LargeUpload(long? maxRequestBufferSize, bool ssl, bool expectPause)
{

View File

@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
// https://github.com/aspnet/KestrelHttpServer/issues/240
// This test currently fails on mono because of an issue with SslStream.
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task CanReadAndWriteWithHttpsConnectionFilter()
{
var serviceContext = new TestServiceContext(new HttpsConnectionFilter(
@ -51,7 +51,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
}
}
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task RequireCertificateFailsWhenNoCertificate()
{
var serviceContext = new TestServiceContext(new HttpsConnectionFilter(
@ -70,7 +70,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
}
}
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task AllowCertificateContinuesWhenNoCertificate()
{
var serviceContext = new TestServiceContext(new HttpsConnectionFilter(
@ -129,7 +129,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
}
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task CertificatePassedToHttpContext()
{
var serviceContext = new TestServiceContext(new HttpsConnectionFilter(
@ -164,7 +164,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
}
}
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task HttpsSchemePassedToRequestFeature()
{
var serviceContext = new TestServiceContext(
@ -183,7 +183,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
}
}
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task DoesNotSupportTls10()
{
var serviceContext = new TestServiceContext(new HttpsConnectionFilter(
@ -295,7 +295,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
}
}
[Fact]
[Fact(Skip = "SslStream hanging on write after update to CoreFx 4.4 (https://github.com/dotnet/corefx/issues/14698)")]
public async Task CertificatePassedToHttpContextIsNotDisposed()
{
var serviceContext = new TestServiceContext(new HttpsConnectionFilter(