activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1483963 - /activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java
Date Fri, 17 May 2013 19:54:09 GMT
Author: chirino
Date: Fri May 17 19:54:09 2013
New Revision: 1483963

URL: http://svn.apache.org/r1483963
Log:
AMQ2584Test was failing on linux due to kahadb taking too long to complete.  Scaled the test
back a bit

Modified:
    activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java

Modified: activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java?rev=1483963&r1=1483962&r2=1483963&view=diff
==============================================================================
--- activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java
(original)
+++ activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java
Fri May 17 19:54:09 2013
@@ -58,7 +58,7 @@ public class AMQ2584Test extends org.apa
     ActiveMQConnection consumerConnection = null, producerConnection = null;
     Session producerSession;
     MessageProducer producer;
-    final int minPercentUsageForStore = 10;
+    final int minPercentUsageForStore = 3;
     String data;
 
     private final TestSupport.PersistenceAdapterChoice persistenceAdapterChoice;
@@ -80,12 +80,13 @@ public class AMQ2584Test extends org.apa
 
     @Test(timeout = 120000)
     public void testSize() throws Exception {
-        CountDownLatch redeliveryConsumerLatch = new CountDownLatch(15000 -1);
+        int messages = 1000;
+        CountDownLatch redeliveryConsumerLatch = new CountDownLatch((messages*3) -1);
         openConsumer(redeliveryConsumerLatch);
 
         assertEquals(0, broker.getAdminView().getStorePercentUsage());
 
-        for (int i = 0; i < 5000; i++) {
+        for (int i = 0; i < messages; i++) {
             sendMessage(false);
         }
 
@@ -93,13 +94,14 @@ public class AMQ2584Test extends org.apa
 
         broker.getSystemUsage().getStoreUsage().isFull();
         LOG.info("store percent usage: "+brokerView.getStorePercentUsage());
-        assertTrue("some store in use", broker.getAdminView().getStorePercentUsage() >
minPercentUsageForStore);
+        int storePercentUsage = broker.getAdminView().getStorePercentUsage();
+        assertTrue("some store in use", storePercentUsage > minPercentUsageForStore);
 
         assertTrue("redelivery consumer got all it needs", redeliveryConsumerLatch.await(60,
TimeUnit.SECONDS));
         closeConsumer();
 
         // consume from DLQ
-        final CountDownLatch received = new CountDownLatch(5000 -1);
+        final CountDownLatch received = new CountDownLatch(messages -1);
         consumerConnection = (ActiveMQConnection) createConnection();
         Session dlqSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         MessageConsumer dlqConsumer = dlqSession.createConsumer(new ActiveMQQueue("ActiveMQ.DLQ"));



Mime
View raw message