Reenable a connection adapter test on TeamCity (#1961)

- Add more tracing to help diagnose failures if they pop up again
This commit is contained in:
Stephen Halter 2017-07-19 15:26:29 -07:00 committed by GitHub
parent 09c92d61d0
commit ecb26d9bbc
1 changed files with 15 additions and 5 deletions

View File

@ -8,20 +8,30 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Testing; using Microsoft.AspNetCore.Testing;
using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging;
using Xunit; using Xunit;
using Xunit.Abstractions;
namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
{ {
public class LoggingConnectionAdapterTests public class LoggingConnectionAdapterTests
{ {
// This test is particularly flaky on some teamcity agents, so skip there for now. private readonly ITestOutputHelper _output;
// https://github.com/aspnet/KestrelHttpServer/issues/1697
[ConditionalFact] public LoggingConnectionAdapterTests(ITestOutputHelper output)
[EnvironmentVariableSkipCondition("TEAMCITY_VERSION", null)] {
_output = output;
}
[Fact]
public async Task LoggingConnectionAdapterCanBeAddedBeforeAndAfterHttpsAdapter() public async Task LoggingConnectionAdapterCanBeAddedBeforeAndAfterHttpsAdapter()
{ {
var host = new WebHostBuilder() var host = new WebHostBuilder()
.ConfigureLogging(builder =>
{
builder.SetMinimumLevel(LogLevel.Trace);
builder.AddXunit(_output);
})
.UseKestrel(options => .UseKestrel(options =>
{ {
options.Listen(new IPEndPoint(IPAddress.Loopback, 0), listenOptions => options.Listen(new IPEndPoint(IPAddress.Loopback, 0), listenOptions =>