diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java index 76f135353c..fc4d9adc55 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java @@ -401,7 +401,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport { sender.close(); Queue queue = getProxyToQueue(getQueueName()); - assertEquals(MSG_COUNT, queue.getMessageCount()); + Wait.assertEquals(MSG_COUNT, queue::getMessageCount); AmqpReceiver receiver1 = session.createReceiver(getQueueName()); receiver1.flow(MSG_COUNT);