From e709fc366d232a1bb020e439643a27f171da59d5 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Thu, 22 Jun 2017 17:59:55 -0400 Subject: [PATCH] NO-JIRA: Fixing a test --- .../artemis/tests/integration/client/RoutingTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RoutingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RoutingTest.java index 7877a7ffec..6e95620dc9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RoutingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RoutingTest.java @@ -277,7 +277,8 @@ public class RoutingTest extends ActiveMQTestBase { ClientMessage message = sendSession.createMessage(false); p.send(message); sendSession.close(); - assertEquals(1, server.locateQueue(queueA).getMessageCount() + server.locateQueue(queueB).getMessageCount()); - assertEquals(2, server.locateQueue(queueC).getMessageCount() + server.locateQueue(queueD).getMessageCount()); + + assertTrue(Wait.waitFor(() -> server.locateQueue(queueA).getMessageCount() + server.locateQueue(queueB).getMessageCount() == 1)); + assertTrue(Wait.waitFor(() -> server.locateQueue(queueC).getMessageCount() + server.locateQueue(queueD).getMessageCount() == 2)); } }