activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r799538 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java
Date Fri, 31 Jul 2009 08:03:41 GMT
Author: gtully
Date: Fri Jul 31 08:03:41 2009
New Revision: 799538

URL: http://svn.apache.org/viewvc?rev=799538&view=rev
Log:
make test resiliant to message expiry before enqueue that can ocurr under load/slow machines

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

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java?rev=799538&r1=799537&r2=799538&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java
Fri Jul 31 08:03:41 2009
@@ -57,8 +57,6 @@
     
     protected void createBroker() throws Exception {
         broker = new BrokerService();
-//        broker.setPersistent(false);
-//        broker.setUseJmx(true);
         broker.setDeleteAllMessagesOnStartup(true);
         broker.setBrokerName(brokerName);
         broker.addConnector(brokerUrl);
@@ -102,7 +100,7 @@
         
         assertEquals("Incorrect inflight count: " + view.getInFlightCount(), 0, view.getInFlightCount());
         assertEquals("Incorrect queue size count", 0, view.getQueueSize());
-        assertEquals("Incorrect expired size count", 3, view.getEnqueueCount());   
+        assertEquals("Incorrect expired size count", view.getEnqueueCount(), view.getExpiredCount());
  
         
         // Send more messages with an expiration 
         for (int i = 0; i < count; i++) {



Mime
View raw message