From 8d6bacb44de5aba5414589a458c56e462c8dd315 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Thu, 24 Sep 2015 05:13:36 -0700 Subject: [PATCH] Made the log level to be warning instead of information --- test/E2ETests/NtlmAuthentationTest.cs | 5 ++++- test/E2ETests/OpenIdConnectTests.cs | 16 ++++++++++++---- test/E2ETests/PublishAndRunTests.cs | 6 ++++-- test/E2ETests/SmokeTests.cs | 7 +++++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/test/E2ETests/NtlmAuthentationTest.cs b/test/E2ETests/NtlmAuthentationTest.cs index 953cde0e13..9b4ebab0e3 100644 --- a/test/E2ETests/NtlmAuthentationTest.cs +++ b/test/E2ETests/NtlmAuthentationTest.cs @@ -21,7 +21,7 @@ namespace E2ETests public async Task NtlmAuthenticationTest(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var logger = new LoggerFactory() - .AddConsole() + .AddConsole(LogLevel.Warning) .CreateLogger(string.Format("Ntlm:{0}:{1}:{2}", serverType, runtimeFlavor, architecture)); using (logger.BeginScope("NtlmAuthenticationTest")) @@ -63,6 +63,9 @@ namespace E2ETests return await httpClient.GetAsync(string.Empty); }, logger: logger, cancellationToken: deploymentResult.HostShutdownToken); + Assert.False(response == null, "Response object is null because the client could not " + + "connect to the server after multiple retries"); + var validator = new Validator(httpClient, httpClientHandler, logger, deploymentResult); await validator.VerifyNtlmHomePage(response); diff --git a/test/E2ETests/OpenIdConnectTests.cs b/test/E2ETests/OpenIdConnectTests.cs index b5638ecdc0..cba026ba2e 100644 --- a/test/E2ETests/OpenIdConnectTests.cs +++ b/test/E2ETests/OpenIdConnectTests.cs @@ -14,10 +14,15 @@ namespace E2ETests { [ConditionalTheory(Skip = "Temporarily skipped the test to fix potential product issue"), Trait("E2Etests", "E2Etests")] [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5040/")] + //[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5040/")] // https://github.com/aspnet/Security/issues/223 - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5041/")] - public async Task OpenIdConnect_OnX86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + // [InlineData( + // ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5041/")] + public async Task OpenIdConnect_OnX86( + ServerType serverType, + RuntimeFlavor runtimeFlavor, + RuntimeArchitecture architecture, + string applicationBaseUrl) { await OpenIdConnectTestSuite(serverType, runtimeFlavor, architecture, applicationBaseUrl); } @@ -33,7 +38,7 @@ namespace E2ETests private async Task OpenIdConnectTestSuite(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var logger = new LoggerFactory() - .AddConsole() + .AddConsole(LogLevel.Warning) .CreateLogger(string.Format("OpenId:{0}:{1}:{2}", serverType, runtimeFlavor, architecture)); using (logger.BeginScope("OpenIdConnectTestSuite")) @@ -73,6 +78,9 @@ namespace E2ETests return await httpClient.GetAsync(string.Empty); }, logger: logger, cancellationToken: deploymentResult.HostShutdownToken); + Assert.False(response == null, "Response object is null because the client could not " + + "connect to the server after multiple retries"); + var validator = new Validator(httpClient, httpClientHandler, logger, deploymentResult); await validator.VerifyHomePage(response); diff --git a/test/E2ETests/PublishAndRunTests.cs b/test/E2ETests/PublishAndRunTests.cs index ecf6c43941..166febbc29 100644 --- a/test/E2ETests/PublishAndRunTests.cs +++ b/test/E2ETests/PublishAndRunTests.cs @@ -54,7 +54,6 @@ namespace E2ETests serverType, runtimeFlavor, architecture, applicationBaseUrl, noSource); } - // https://github.com/aspnet/MusicStore/issues/487 [ConditionalTheory, Trait("E2Etests", "E2Etests")] [FrameworkSkipCondition(RuntimeFrameworks.CLR | RuntimeFrameworks.CoreCLR)] [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5029/", false)] @@ -82,7 +81,7 @@ namespace E2ETests bool noSource) { var logger = new LoggerFactory() - .AddConsole() + .AddConsole(LogLevel.Warning) .CreateLogger($"Publish:{serverType}:{runtimeFlavor}:{architecture}:{noSource}"); using (logger.BeginScope("Publish_And_Run_Tests")) @@ -127,6 +126,9 @@ namespace E2ETests return await httpClient.GetAsync(string.Empty); }, logger: logger, cancellationToken: deploymentResult.HostShutdownToken); + Assert.False(response == null, "Response object is null because the client could not " + + "connect to the server after multiple retries"); + var validator = new Validator(httpClient, httpClientHandler, logger, deploymentResult); await validator.VerifyHomePage(response); diff --git a/test/E2ETests/SmokeTests.cs b/test/E2ETests/SmokeTests.cs index 5841c557ac..f0dbdda567 100644 --- a/test/E2ETests/SmokeTests.cs +++ b/test/E2ETests/SmokeTests.cs @@ -150,8 +150,8 @@ namespace E2ETests bool noSource = false) { var logger = new LoggerFactory() - .AddConsole() - .CreateLogger(string.Format("Smoke:{0}:{1}:{2}", serverType, donetFlavor, architecture)); + .AddConsole(LogLevel.Warning) + .CreateLogger($"Smoke:{serverType}:{donetFlavor}:{architecture}"); using (logger.BeginScope("SmokeTestSuite")) { @@ -199,6 +199,9 @@ namespace E2ETests return await httpClient.GetAsync(string.Empty); }, logger: logger, cancellationToken: deploymentResult.HostShutdownToken); + Assert.False(response == null, "Response object is null because the client could not " + + "connect to the server after multiple retries"); + var validator = new Validator(httpClient, httpClientHandler, logger, deploymentResult); await validator.VerifyHomePage(response);