ARTEMIS-1513 Fix intermittent failure

This commit is contained in:
Clebert Suconic 2017-11-21 10:31:42 -05:00
parent accec57e56
commit 16d9b191a1
1 changed files with 5 additions and 5 deletions

View File

@ -133,12 +133,12 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
AmqpReceiver receiver = session.createReceiver(getQueueName(1));
Queue queueView = getProxyToQueue(getQueueName());
assertEquals(1, queueView.getConsumerCount());
assertEquals(0, queueView.getMessageCount());
Wait.assertEquals(1, queueView::getConsumerCount);
Wait.assertEquals(0, queueView::getMessageCount);
queueView = getProxyToQueue(getQueueName(1));
assertEquals(1, queueView.getConsumerCount());
assertEquals(1, queueView.getMessageCount());
Wait.assertEquals(1, queueView::getConsumerCount);
Wait.assertEquals(1, queueView::getMessageCount);
receiver.flow(1);
AmqpMessage message = receiver.receive(5, TimeUnit.SECONDS);
@ -146,7 +146,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
message.accept();
receiver.close();
assertEquals(0, queueView.getMessageCount());
Wait.assertEquals(0, queueView::getMessageCount);
connection.close();
}