Skip to content

Commit c8c12cd

Browse files
Fix test discovery (#8201)
1 parent 33839dc commit c8c12cd

File tree

1 file changed

+8
-4
lines changed
  • src/SignalR/server/StackExchangeRedis/test

1 file changed

+8
-4
lines changed

src/SignalR/server/StackExchangeRedis/test/Docker.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public int RunCommand(string commandAndArguments, string prefix, out string outp
132132

133133
public int RunCommand(string commandAndArguments, string prefix, ILogger logger, out string output)
134134
{
135-
return RunProcessAndWait(_path, commandAndArguments, prefix, logger, TimeSpan.FromSeconds(5), out output);
135+
return RunProcessAndWait(_path, commandAndArguments, prefix, logger, TimeSpan.FromSeconds(30), out output);
136136
}
137137

138138
private static void RunProcessAndThrowIfFailed(string fileName, string arguments, string prefix, ILogger logger, TimeSpan timeout)
@@ -155,10 +155,14 @@ private static int RunProcessAndWait(string fileName, string arguments, string p
155155
{
156156
process.Close();
157157
logger.LogError("Closing process '{processName}' because it is running longer than the configured timeout.", fileName);
158+
output = string.Join(Environment.NewLine, lines.ToArray());
159+
return -1;
160+
}
161+
else
162+
{
163+
// Need to WaitForExit without a timeout to guarantee the output stream has written everything
164+
process.WaitForExit();
158165
}
159-
160-
// Need to WaitForExit without a timeout to guarantee the output stream has written everything
161-
process.WaitForExit();
162166

163167
output = string.Join(Environment.NewLine, lines);
164168

0 commit comments

Comments
 (0)