From ab92306d81df10e6cfdc771973b39980721a6f98 Mon Sep 17 00:00:00 2001 From: Erich Duda Date: Mon, 3 Jul 2017 15:36:28 +0200 Subject: [PATCH] ARTEMIS-1274 MultipleProducersTest.wrongQueue fails --- .../tests/integration/client/MultipleProducersTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleProducersTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleProducersTest.java index 147e8198b2..f41242696c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleProducersTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleProducersTest.java @@ -32,6 +32,7 @@ import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.core.settings.impl.SlowConsumerPolicy; import org.apache.activemq.artemis.tests.util.JMSTestBase; +import org.apache.activemq.artemis.tests.util.Wait; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -141,6 +142,9 @@ public class MultipleProducersTest extends JMSTestBase { conn.close(); + Wait.waitFor(() -> server.locateQueue(queueOneName).getMessageCount() == 5); + Wait.waitFor(() -> server.locateQueue(queueTwoName).getMessageCount() == 5); + queueOneMsgCount = server.locateQueue(queueOneName).getMessageCount(); queueTwoMsgCount = server.locateQueue(queueTwoName).getMessageCount();