mirror of https://github.com/apache/activemq.git
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
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1409962 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fb62989e5e
commit
a8a7693996
|
@ -330,17 +330,15 @@ public class ExpiredMessagesWithNoConsumerTest extends CombinationTestSupport {
|
|||
|
||||
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 ExpiredMessagesWithNoConsumerTest extends CombinationTestSupport {
|
|||
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 ExpiredMessagesWithNoConsumerTest extends CombinationTestSupport {
|
|||
|
||||
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 ExpiredMessagesWithNoConsumerTest extends CombinationTestSupport {
|
|||
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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue