diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java index 7bc648f635..6c58a8a6bd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java @@ -338,6 +338,7 @@ public class AddressControlTest extends ManagementTestBase { session.createQueue(address, RoutingType.ANYCAST, address.concat('2')); producer.send(session.createMessage(false)); + Wait.waitFor(() -> addressControl.getMessageCount() == 2); assertEquals(2, addressControl.getMessageCount()); }