Skip to content

Commit

Permalink
Fixed Thread Sleep and messageSize
Browse files Browse the repository at this point in the history
Thread was sleeping "messageSizeInBytes" milliseconds, this is unnecessary and the variable use to determine the amount of sleep time was wrong.

The RunTest() method was starting up with message size fixed to 1000 instead of using the value in messageSizeInBytes.
  • Loading branch information
njfsilva committed Aug 1, 2013
1 parent 8cd3618 commit 6b46615
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Mike.MQShootout/ShootoutTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Threading;
using System.Threading;

namespace Mike.MQShootout
{
Expand All @@ -18,11 +18,9 @@ public void Run(int messageSizeInBytes, long numberOfMessages)
var receivingMachine = new MessageReceivingMachine(messageReceiver, numberOfMessages);
var sendingMachine = new MessageSendingMachine(messageSender);

Thread.Sleep(messageSizeInBytes);

sendingMachine.RunTest(1000, numberOfMessages);
sendingMachine.RunTest(messageSizeInBytes, numberOfMessages);

receivingMachine.WaitForCompletion();
}
}
}
}

0 comments on commit 6b46615

Please sign in to comment.