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);