From ecb26d9bbc93fef1ef03fe5a38414c5b79d7c21d Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Wed, 19 Jul 2017 15:26:29 -0700 Subject: [PATCH] Reenable a connection adapter test on TeamCity (#1961) - Add more tracing to help diagnose failures if they pop up again --- .../LoggingConnectionAdapterTests.cs | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/LoggingConnectionAdapterTests.cs b/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/LoggingConnectionAdapterTests.cs index 39c77b3cdd..24e72aa336 100644 --- a/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/LoggingConnectionAdapterTests.cs +++ b/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/LoggingConnectionAdapterTests.cs @@ -8,20 +8,30 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Testing; -using Microsoft.AspNetCore.Testing.xunit; +using Microsoft.Extensions.Logging; using Xunit; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests { public class LoggingConnectionAdapterTests { - // This test is particularly flaky on some teamcity agents, so skip there for now. - // https://github.com/aspnet/KestrelHttpServer/issues/1697 - [ConditionalFact] - [EnvironmentVariableSkipCondition("TEAMCITY_VERSION", null)] + private readonly ITestOutputHelper _output; + + public LoggingConnectionAdapterTests(ITestOutputHelper output) + { + _output = output; + } + + [Fact] public async Task LoggingConnectionAdapterCanBeAddedBeforeAndAfterHttpsAdapter() { var host = new WebHostBuilder() + .ConfigureLogging(builder => + { + builder.SetMinimumLevel(LogLevel.Trace); + builder.AddXunit(_output); + }) .UseKestrel(options => { options.Listen(new IPEndPoint(IPAddress.Loopback, 0), listenOptions =>