Skip to content

Commit 92fbe8a

Browse files
Windows-specific fixes
1 parent 4681962 commit 92fbe8a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

projects/client/Unit/src/unit/Fixtures.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ protected List<ConnectionInfo> ListConnections()
432432
Process proc = ExecRabbitMQCtl("list_connections -q pid peer_port");
433433
String stdout = proc.StandardOutput.ReadToEnd();
434434

435-
string[] splitOn = {Environment.NewLine};
435+
// {Environment.NewLine} is not sufficient
436+
string[] splitOn = new string[] { "\r\n", "\n" };
436437
string[] lines = stdout.Split(splitOn, StringSplitOptions.RemoveEmptyEntries);
437438

438439
// line: <[email protected]> 58713
@@ -459,9 +460,9 @@ protected void CloseAllConnections()
459460

460461
protected void CloseConnection(string pid)
461462
{
462-
ExecRabbitMQCtl("close_connection '" +
463+
ExecRabbitMQCtl("close_connection \"" +
463464
pid +
464-
"' 'Closed via rabbitmqctl'");
465+
"\" \"Closed via rabbitmqctl\"");
465466
}
466467
}
467468

0 commit comments

Comments
 (0)