Skip to content

Commit b9353ce

Browse files
committed
Remove some debugging. No need to use cmd.exe on Windows to run a command.
1 parent 220b4cf commit b9353ce

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

projects/Unit/Fixtures.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ internal Process ExecCommand(string command, string args)
504504
return ExecCommand(command, args, null);
505505
}
506506

507-
internal Process ExecCommand(string ctl, string args, string changeDirTo)
507+
internal Process ExecCommand(string cmd, string args, string changeDirTo)
508508
{
509509
var proc = new Process
510510
{
@@ -514,35 +514,32 @@ internal Process ExecCommand(string ctl, string args, string changeDirTo)
514514
UseShellExecute = false
515515
}
516516
};
517-
if(changeDirTo != null)
517+
518+
if (changeDirTo != null)
518519
{
519520
proc.StartInfo.WorkingDirectory = changeDirTo;
520521
}
521522

523+
/*
522524
string cmd;
523525
if(IsRunningOnMonoOrDotNetCore()) {
524526
cmd = ctl;
525527
} else {
526528
cmd = "cmd.exe";
527529
args = $"/c \"\"{ctl}\" {args}\"";
528530
}
531+
*/
529532

530533
try {
531-
System.Console.WriteLine("@@@@@@@@ ExecCommand FileName: {0}", cmd);
532534
proc.StartInfo.FileName = cmd;
533-
534-
System.Console.WriteLine("@@@@@@@@ ExecCommand Arguments: {0}", args);
535535
proc.StartInfo.Arguments = args;
536-
537536
proc.StartInfo.RedirectStandardError = true;
538537
proc.StartInfo.RedirectStandardOutput = true;
539538

540-
System.Console.WriteLine("@@@@@@@@ ExecCommand Start()");
541539
proc.Start();
542-
System.Console.WriteLine("@@@@@@@@ ExecCommand WaitForExit()");
543540
proc.WaitForExit();
541+
544542
string stderr = proc.StandardError.ReadToEnd();
545-
System.Console.WriteLine("@@@@@@@@ ExecCommand WaitForExit() DONE ExitCode: {0} stderr: {1}", proc.ExitCode, stderr);
546543
if (stderr.Length > 0 || proc.ExitCode > 0)
547544
{
548545
string stdout = proc.StandardOutput.ReadToEnd();

projects/Unit/TestConnectionRecovery.cs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,20 +1026,11 @@ internal void CloseAndWaitForRecovery()
10261026

10271027
internal void CloseAndWaitForRecovery(AutorecoveringConnection conn)
10281028
{
1029-
System.Console.WriteLine("@@@@@@@@ CloseAndWaitForRecovery START");
10301029
ManualResetEventSlim sl = PrepareForShutdown(conn);
10311030
ManualResetEventSlim rl = PrepareForRecovery(conn);
1032-
System.Console.WriteLine("@@@@@@@@ CloseAndWaitForRecovery Closing Connection START");
10331031
CloseConnection(conn);
1034-
System.Console.WriteLine("@@@@@@@@ CloseAndWaitForRecovery Closing Connection DONE");
1035-
1036-
System.Console.WriteLine("@@@@@@@@ CloseAndWaitForRecovery Shutdown Wait START");
10371032
Wait(sl);
1038-
System.Console.WriteLine("@@@@@@@@ CloseAndWaitForRecovery Shutdown Wait DONE");
1039-
1040-
System.Console.WriteLine("@@@@@@@@ CloseAndWaitForRecovery Recovery Wait START");
10411033
Wait(rl);
1042-
System.Console.WriteLine("@@@@@@@@ CloseAndWaitForRecovery Recovery Wait DONE");
10431034
}
10441035

10451036
internal void CloseAndWaitForShutdown(AutorecoveringConnection conn)
@@ -1187,13 +1178,15 @@ public override void HandleBasicDeliver(string consumerTag,
11871178
{
11881179
try
11891180
{
1190-
System.Console.WriteLine("@@@@@@@@ HandleBasicDeliver deliveryTag: {0}", deliveryTag);
1191-
11921181
if (deliveryTag == 5)
11931182
{
11941183
_action();
11951184
}
11961185

1186+
/*
1187+
* Note: wait for one more message to be delivered before
1188+
* setting this reset event
1189+
*/
11971190
if (deliveryTag == 6)
11981191
{
11991192
_latch.Set();

0 commit comments

Comments
 (0)