diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpExpiredMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpExpiredMessageTest.java index f360ab7f0a..121137f431 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpExpiredMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpExpiredMessageTest.java @@ -50,14 +50,13 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport { sender.send(message); sender.close(); - Wait.assertEquals(1, queueView::getMessageCount); - // Now try and get the message AmqpReceiver receiver = session.createReceiver(getQueueName()); receiver.flow(1); AmqpMessage received = receiver.receiveNoWait(); assertNull(received); + Wait.assertEquals(0, queueView::getMessageCount); Wait.assertEquals(1, queueView::getMessagesExpired); connection.close();