diff --git a/artemis-cli/src/test/java/org/apache/activemq/cli/test/CheckTest.java b/artemis-cli/src/test/java/org/apache/activemq/cli/test/CheckTest.java index 5abc8a6637..7663bf5dd1 100644 --- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/CheckTest.java +++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/CheckTest.java @@ -381,7 +381,7 @@ public class CheckTest extends CliTestBase { queueControl = (QueueControl)server.getManagementService(). getResource(ResourceNames.QUEUE + queueName); - Assert.assertEquals(messages, queueControl.getMessageCount()); + Wait.assertEquals(messages, queueControl::getMessageCount); } finally { stopServer(); }