activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1311402 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
Date Mon, 09 Apr 2012 19:58:14 GMT
Author: tabish
Date: Mon Apr  9 19:58:13 2012
New Revision: 1311402

URL: http://svn.apache.org/viewvc?rev=1311402&view=rev
Log:
Test can hang if the async event isn't received, add a timeout in the test loop's wait call
to prevent this. 

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java?rev=1311402&r1=1311401&r2=1311402&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
Mon Apr  9 19:58:13 2012
@@ -70,7 +70,7 @@ public class OnePrefetchAsyncConsumerTes
         long done = System.currentTimeMillis() + getMaxTestTime();
         synchronized (testMutex) {
            while (!testMutex.testCompleted && System.currentTimeMillis() < done)
{
-              testMutex.wait();
+              testMutex.wait(TimeUnit.SECONDS.toMillis(5));
            }
         }
 



Mime
View raw message