mirror of
https://github.com/apache/activemq.git
synced 2025-02-23 02:27:23 +00:00
apply fix for: https://issues.apache.org/jira/browse/AMQ-4288
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1441081 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0d27c49bbf
commit
b8bbca6773
@ -108,9 +108,10 @@ public class OptimizedAckTest extends TestSupport {
|
|||||||
for (int i=0; i<10; i++) {
|
for (int i=0; i<10; i++) {
|
||||||
Thread.sleep(400);
|
Thread.sleep(400);
|
||||||
javax.jms.Message msg = consumer.receive(4000);
|
javax.jms.Message msg = consumer.receive(4000);
|
||||||
|
long inFlightCount = regionBroker.getDestinationStatistics().getInflight().getCount();
|
||||||
assertNotNull(msg);
|
assertNotNull(msg);
|
||||||
if (i<7) {
|
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 {
|
} else {
|
||||||
assertTrue("most are acked but 3 remain", Wait.waitFor(new Wait.Condition(){
|
assertTrue("most are acked but 3 remain", Wait.waitFor(new Wait.Condition(){
|
||||||
@Override
|
@Override
|
||||||
@ -145,9 +146,10 @@ public class OptimizedAckTest extends TestSupport {
|
|||||||
|
|
||||||
for (int i=0; i<10; i++) {
|
for (int i=0; i<10; i++) {
|
||||||
javax.jms.Message msg = consumer.receive(4000);
|
javax.jms.Message msg = consumer.receive(4000);
|
||||||
|
long inFlightCount = regionBroker.getDestinationStatistics().getInflight().getCount();
|
||||||
assertNotNull(msg);
|
assertNotNull(msg);
|
||||||
if (i<7) {
|
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 {
|
} else {
|
||||||
assertTrue("most are acked but 3 remain", Wait.waitFor(new Wait.Condition(){
|
assertTrue("most are acked but 3 remain", Wait.waitFor(new Wait.Condition(){
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user