activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r986475 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs
Date Tue, 17 Aug 2010 20:30:10 GMT
Author: jgomes
Date: Tue Aug 17 20:30:10 2010
New Revision: 986475

URL: http://svn.apache.org/viewvc?rev=986475&view=rev
Log:
Add sleep loops to avoid CPU burn-out when running the test takes longer than normal.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs?rev=986475&r1=986474&r2=986475&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransportTest.cs
Tue Aug 17 20:30:10 2010
@@ -228,7 +228,8 @@ namespace Apache.NMS.ActiveMQ.Test
             MockTransport mock = null;
             while(mock == null ) {
                 mock = (MockTransport) transport.Narrow(typeof(MockTransport));
-            }
+				Thread.Sleep(50);
+			}
             mock.OutgoingCommand = new CommandHandler(OnCommand);
 
             ActiveMQMessage message = new ActiveMQMessage();
@@ -270,7 +271,8 @@ namespace Apache.NMS.ActiveMQ.Test
             MockTransport mock = null;
             while(mock == null ) {
                 mock = (MockTransport) transport.Narrow(typeof(MockTransport));
-            }
+				Thread.Sleep(50);
+			}
             mock.OutgoingCommand = new CommandHandler(OnCommand);
 
             ActiveMQMessage message = new ActiveMQMessage();
@@ -315,7 +317,8 @@ namespace Apache.NMS.ActiveMQ.Test
             MockTransport mock = null;
             while(mock == null ) {
                 mock = (MockTransport) transport.Narrow(typeof(MockTransport));
-            }
+				Thread.Sleep(50);
+			}
             mock.OutgoingCommand = new CommandHandler(OnCommand);
 
             ActiveMQMessage message = new ActiveMQMessage();
@@ -396,7 +399,8 @@ namespace Apache.NMS.ActiveMQ.Test
             MockTransport mock = null;
             while(mock == null ) {
                 mock = (MockTransport) transport.Narrow(typeof(MockTransport));
-            }
+				Thread.Sleep(50);
+			}
             mock.OutgoingCommand = new CommandHandler(OnCommand);
 
             ActiveMQMessage message = new ActiveMQMessage();
@@ -573,7 +577,8 @@ namespace Apache.NMS.ActiveMQ.Test
             MockTransport mock = null;
             while(mock == null ) {
                 mock = (MockTransport) transport.Narrow(typeof(MockTransport));
-            }
+				Thread.Sleep(50);
+			}
 
             mock.InjectCommand(cmd);
 
@@ -585,6 +590,7 @@ namespace Apache.NMS.ActiveMQ.Test
 
             while(mock == null) {
                 mock = (MockTransport) transport.Narrow(typeof(MockTransport));
+				Thread.Sleep(50);
             }
 
             Assert.AreEqual("Reconnected", mock.Name);



Mime
View raw message