git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1441081 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2013-01-31 17:32:58 +00:00
parent 0d27c49bbf
commit b8bbca6773

View File

@ -108,9 +108,10 @@ public class OptimizedAckTest extends TestSupport {
for (int i=0; i<10; i++) {
Thread.sleep(400);
javax.jms.Message msg = consumer.receive(4000);
long inFlightCount = regionBroker.getDestinationStatistics().getInflight().getCount();
assertNotNull(msg);
if (i<7) {
assertEquals("all prefetch is still in flight: " + i, 10, regionBroker.getDestinationStatistics().getInflight().getCount());
assertEquals("all prefetch is still in flight: " + i, 10, inFlightCount);
} else {
assertTrue("most are acked but 3 remain", Wait.waitFor(new Wait.Condition(){
@Override
@ -145,9 +146,10 @@ public class OptimizedAckTest extends TestSupport {
for (int i=0; i<10; i++) {
javax.jms.Message msg = consumer.receive(4000);
long inFlightCount = regionBroker.getDestinationStatistics().getInflight().getCount();
assertNotNull(msg);
if (i<7) {
assertEquals("all prefetch is still in flight", 10, regionBroker.getDestinationStatistics().getInflight().getCount());
assertEquals("all prefetch is still in flight", 10, inFlightCount);
} else {
assertTrue("most are acked but 3 remain", Wait.waitFor(new Wait.Condition(){
@Override