From 974423e0d21a2280b2d88b0a1a1cdd35a13a6183 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Mon, 4 May 2020 15:31:18 -0400 Subject: [PATCH] NO-JIRA fixing test AmqpExpiredMessageTest will expire messages, eventually the counter could be 0 so it is invalid to assertEquals(1, queue.getMessageCount()) as it will be 0 eventually. --- .../artemis/tests/integration/amqp/AmqpExpiredMessageTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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();