From c8c12cda9bb91499cdaf613dc04e077926302670 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Mon, 4 Mar 2019 23:11:16 -0800 Subject: [PATCH] Fix test discovery (#8201) --- src/SignalR/server/StackExchangeRedis/test/Docker.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/SignalR/server/StackExchangeRedis/test/Docker.cs b/src/SignalR/server/StackExchangeRedis/test/Docker.cs index 6286ad39e8..c5f613461e 100644 --- a/src/SignalR/server/StackExchangeRedis/test/Docker.cs +++ b/src/SignalR/server/StackExchangeRedis/test/Docker.cs @@ -132,7 +132,7 @@ namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests public int RunCommand(string commandAndArguments, string prefix, ILogger logger, out string output) { - return RunProcessAndWait(_path, commandAndArguments, prefix, logger, TimeSpan.FromSeconds(5), out output); + return RunProcessAndWait(_path, commandAndArguments, prefix, logger, TimeSpan.FromSeconds(30), out output); } private static void RunProcessAndThrowIfFailed(string fileName, string arguments, string prefix, ILogger logger, TimeSpan timeout) @@ -155,10 +155,14 @@ namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests { process.Close(); logger.LogError("Closing process '{processName}' because it is running longer than the configured timeout.", fileName); + output = string.Join(Environment.NewLine, lines.ToArray()); + return -1; + } + else + { + // Need to WaitForExit without a timeout to guarantee the output stream has written everything + process.WaitForExit(); } - - // Need to WaitForExit without a timeout to guarantee the output stream has written everything - process.WaitForExit(); output = string.Join(Environment.NewLine, lines);