diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AutoCreateDeadLetterResourcesTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AutoCreateDeadLetterResourcesTest.java index 484b83a6d9..9651b0e6c4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AutoCreateDeadLetterResourcesTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AutoCreateDeadLetterResourcesTest.java @@ -240,14 +240,14 @@ public class AutoCreateDeadLetterResourcesTest extends ActiveMQTestBase { ClientProducer producer = addClientProducer(session.createProducer(moveFromAddress)); producer.send(session.createMessage(true)); producer.close(); - + Wait.assertEquals(1L, server.locateQueue(moveFromQueue)::getMessageCount, 2000, 100); server.locateQueue(moveFromQueue).moveReferences(null, addressA, null); - Wait.assertEquals(1L, () -> server.locateQueue(queueA).getMessageCount(), 2000, 100); + Wait.assertEquals(1L, server.locateQueue(queueA)::getMessageCount, 2000, 100); triggerDlaDelivery(); - Wait.assertTrue(() -> server.locateQueue(dlqName).getMessageCount() == 1, 2000, 100); + Wait.assertEquals(1L, server.locateQueue(dlqName)::getMessageCount, 2000, 100); ClientConsumer consumer = session.createConsumer(dlqName); session.start();