You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2009/02/17 12:55:53 UTC
svn commit: r744972 -
/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java
Author: gtully
Date: Tue Feb 17 11:55:53 2009
New Revision: 744972
URL: http://svn.apache.org/viewvc?rev=744972&view=rev
Log:
fix intermittent failure when sync close beats async ack
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java?rev=744972&r1=744971&r2=744972&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java Tue Feb 17 11:55:53 2009
@@ -1114,6 +1114,9 @@
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.
connection1.request(closeConsumerInfo(consumerInfo1));