activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1085119 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usage/StoreUsageTest.java
Date Thu, 24 Mar 2011 20:31:26 GMT
Author: tabish
Date: Thu Mar 24 20:31:26 2011
New Revision: 1085119

URL: http://svn.apache.org/viewvc?rev=1085119&view=rev
Log:
On a slow machine this test can take a lot longer, so increase the wait time accordingly.

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

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usage/StoreUsageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usage/StoreUsageTest.java?rev=1085119&r1=1085118&r2=1085119&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usage/StoreUsageTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usage/StoreUsageTest.java
Thu Mar 24 20:31:26 2011
@@ -29,6 +29,8 @@ import javax.jms.Session;
 
 public class StoreUsageTest extends EmbeddedBrokerTestSupport {
 
+    final int WAIT_TIME_MILLS = 20*1000;
+
     @Override
     protected BrokerService createBroker() throws Exception {
         BrokerService broker = super.createBroker();
@@ -51,17 +53,17 @@ public class StoreUsageTest extends Embe
         producer.start();
 
         // wait for the producer to block
-        Thread.sleep(5000);
+        Thread.sleep(WAIT_TIME_MILLS / 2);
 
         broker.getAdminView().setStoreLimit(1024 * 1024);
 
-        Thread.sleep(5000);
+        Thread.sleep(WAIT_TIME_MILLS);
 
         Wait.waitFor(new Wait.Condition() {
             public boolean isSatisified() throws Exception {
                 return producer.getSentCount() == producer.getMessageCount();
             }
-        }, 5000);
+        }, WAIT_TIME_MILLS * 2);
 
         assertEquals("Producer didn't send all messages", producer.getMessageCount(), producer.getSentCount());
 



Mime
View raw message