activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1409962 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java
Date Thu, 15 Nov 2012 20:09:46 GMT
Author: gtully
Date: Thu Nov 15 20:09:45 2012
New Revision: 1409962

URL: http://svn.apache.org/viewvc?rev=1409962&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-4083 - update assertions in org.apache.activemq.usecases.ExpiredMessagesWithNoConsumerTest
regression to reflect new ack strategy around expired messages

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

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java?rev=1409962&r1=1409961&r2=1409962&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java
Thu Nov 15 20:09:45 2012
@@ -330,17 +330,15 @@ public class ExpiredMessagesWithNoConsum
 
         Wait.waitFor(new Wait.Condition() {
             public boolean isSatisified() throws Exception {
-                // consumer ackLater(delivery ack for expired messages) is based on half
the prefetch value
-                // which will leave half of the prefetch pending till consumer close
-                return (queuePrefetch/2) -1 == view.getInFlightCount();
+                return 0 == view.getInFlightCount();
             }
         });
         LOG.info("enqueue=" + view.getEnqueueCount() + ", dequeue=" + view.getDequeueCount()
                 + ", inflight=" + view.getInFlightCount() + ", expired= " + view.getExpiredCount()
                 + ", size= " + view.getQueueSize());
 
-        assertEquals("inflight didn't reduce to half prefetch minus single delivered message",
-                     (queuePrefetch/2) -1, view.getInFlightCount());
+        assertEquals("inflight reduced to duck",
+                     0, view.getInFlightCount());
         assertEquals("size didn't get back to 0 ", 0, view.getQueueSize());
         assertEquals("dequeues didn't match sent/expired ", sendCount, view.getDequeueCount());
 
@@ -351,7 +349,7 @@ public class ExpiredMessagesWithNoConsum
                 return 0 == view.getInFlightCount();
             }
         });
-        assertEquals("inflight goes to zeor on close", 0, view.getInFlightCount());
+        assertEquals("inflight goes to zero on close", 0, view.getInFlightCount());
 
         LOG.info("done: " + getName());
     }
@@ -445,17 +443,15 @@ public class ExpiredMessagesWithNoConsum
 
         Wait.waitFor(new Wait.Condition() {
             public boolean isSatisified() throws Exception {
-                // consumer ackLater(delivery ack for expired messages) is based on half
the prefetch value
-                // which will leave half of the prefetch pending till consumer close
-                return (queuePrefetch/2) -1 == view.getInFlightCount();
+                return 0 == view.getInFlightCount();
             }
         });
         LOG.info("enqueue=" + view.getEnqueueCount() + ", dequeue=" + view.getDequeueCount()
                 + ", inflight=" + view.getInFlightCount() + ", expired= " + view.getExpiredCount()
                 + ", size= " + view.getQueueSize());
 
-        assertEquals("inflight didn't reduce to half prefetch minus single delivered message",
-                     (queuePrefetch/2) -1, view.getInFlightCount());
+        assertEquals("inflight didn't reduce to duck",
+                     0, view.getInFlightCount());
         assertEquals("size doesn't get back to 0 ", 0, view.getQueueSize());
         assertEquals("dequeues don't match sent/expired ", sendCount, view.getDequeueCount());
 
@@ -483,7 +479,7 @@ public class ExpiredMessagesWithNoConsum
                 return 0 == view.getInFlightCount();
             }
         });
-        assertEquals("inflight did not go to zeor on close", 0, view.getInFlightCount());
+        assertEquals("inflight did not go to zero on close", 0, view.getInFlightCount());
 
         LOG.info("done: " + getName());
     }



Mime
View raw message