fix intermittent failure when sync close beats async ack

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@744972 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-02-17 11:55:53 +00:00
parent b0eb9731c0
commit b4aa979d90
1 changed files with 3 additions and 0 deletions

View File

@ -1114,6 +1114,9 @@ public class BrokerTest extends BrokerTestSupport {
connection1.send(createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE)); connection1.send(createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE));
} }
// give the async ack a chance to perculate and validate all are currently consumed
assertNull(connection1.getDispatchQueue().poll(MAX_NULL_WAIT, TimeUnit.MILLISECONDS));
// Close the consumer. // Close the consumer.
connection1.request(closeConsumerInfo(consumerInfo1)); connection1.request(closeConsumerInfo(consumerInfo1));