mirror of https://github.com/apache/activemq.git
merge -c 904450 https://svn.apache.org/repos/asf/activemq/trunk - wait for queues to drain, intermittent failure
git-svn-id: https://svn.apache.org/repos/asf/activemq/branches/activemq-5.3@906451 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
58d729f0f8
commit
dc70734b25
|
@ -36,7 +36,6 @@ import javax.jms.MessageProducer;
|
|||
import javax.jms.Queue;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TextMessage;
|
||||
import javax.management.MBeanServerInvocationHandler;
|
||||
import javax.management.MalformedObjectNameException;
|
||||
import javax.management.ObjectName;
|
||||
|
||||
|
@ -52,6 +51,7 @@ import org.apache.activemq.usage.MemoryUsage;
|
|||
import org.apache.activemq.usage.StoreUsage;
|
||||
import org.apache.activemq.usage.SystemUsage;
|
||||
import org.apache.activemq.usage.TempUsage;
|
||||
import org.apache.activemq.util.Wait;
|
||||
|
||||
/**
|
||||
* Modified CursorSupport Unit test to reproduce the negative queue issue.
|
||||
|
@ -225,8 +225,17 @@ public class NegativeQueueTest extends TestCase {
|
|||
System.out.println("Queue2 Size = "+proxyQueue2.getQueueSize());
|
||||
System.out.println("Queue2 Memory % Used = "+proxyQueue2.getMemoryPercentUsage());
|
||||
}
|
||||
|
||||
|
||||
Wait.waitFor(new Wait.Condition() {
|
||||
public boolean isSatisified() throws Exception {
|
||||
return 0 == proxyQueue1.getQueueSize();
|
||||
}});
|
||||
assertEquals("Queue1 has gone negative,",0, proxyQueue1.getQueueSize());
|
||||
|
||||
Wait.waitFor(new Wait.Condition() {
|
||||
public boolean isSatisified() throws Exception {
|
||||
return 0 == proxyQueue2.getQueueSize();
|
||||
}});
|
||||
assertEquals("Queue2 has gone negative,",0, proxyQueue2.getQueueSize());
|
||||
proxyConnection.close();
|
||||
|
||||
|
|
Loading…
Reference in New Issue