From a2d088bc3c6b02f0b7844a89d61bba0f027bdb1e Mon Sep 17 00:00:00 2001 From: Pawel Kadluczka Date: Thu, 9 Mar 2017 16:58:46 -0800 Subject: [PATCH] Increasing the timeout of host start (#279) * Increasing the timeout of host start * Increasing log level --- test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs | 4 ++++ test/Microsoft.AspNetCore.SignalR.Tests/ServerFixture.cs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs b/test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs index 08bb88a562..c12d131654 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs @@ -32,6 +32,10 @@ namespace Microsoft.AspNetCore.SignalR.Tests public EndToEndTests(ServerFixture serverFixture) { + if (serverFixture == null) + { + throw new ArgumentNullException(nameof(serverFixture)); + } _serverFixture = serverFixture; } diff --git a/test/Microsoft.AspNetCore.SignalR.Tests/ServerFixture.cs b/test/Microsoft.AspNetCore.SignalR.Tests/ServerFixture.cs index d696b2b2ab..0feb0ffc5a 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests/ServerFixture.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests/ServerFixture.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests var _verbose = string.Equals(Environment.GetEnvironmentVariable("SIGNALR_TESTS_VERBOSE"), "1"); if (_verbose) { - _loggerFactory.AddConsole(); + _loggerFactory.AddConsole(LogLevel.Debug); } if (Debugger.IsAttached) { @@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests var t = Task.Run(() => host.Start()); Console.WriteLine("Starting test server..."); lifetime = host.Services.GetRequiredService(); - if (!lifetime.ApplicationStarted.WaitHandle.WaitOne(TimeSpan.FromSeconds(1))) + if (!lifetime.ApplicationStarted.WaitHandle.WaitOne(TimeSpan.FromSeconds(5))) { // t probably faulted if (t.IsFaulted)