From 6b4661573146ceea4bead43f0b1ee3b38d7269cb Mon Sep 17 00:00:00 2001 From: njfsilva Date: Thu, 1 Aug 2013 15:07:33 +0100 Subject: [PATCH] Fixed Thread Sleep and messageSize 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. --- Mike.MQShootout/ShootoutTest.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Mike.MQShootout/ShootoutTest.cs b/Mike.MQShootout/ShootoutTest.cs index 82ef02e..82cef1b 100755 --- a/Mike.MQShootout/ShootoutTest.cs +++ b/Mike.MQShootout/ShootoutTest.cs @@ -1,4 +1,4 @@ -using System.Threading; +using System.Threading; namespace Mike.MQShootout { @@ -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(); } } -} \ No newline at end of file +}