From c883a73746efa6d83a1d8bdeba6735942cf7bf83 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Thu, 23 Apr 2020 22:28:13 -0400 Subject: [PATCH] NO-JIRA Fixing intermittent failure --- .../tests/integration/federation/FederatedAddressTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedAddressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedAddressTest.java index 9bb6059a4c..5b1b4db1dd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedAddressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedAddressTest.java @@ -37,7 +37,9 @@ import org.apache.activemq.artemis.core.server.impl.AddressInfo; import org.apache.activemq.artemis.core.server.transformer.Transformer; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.artemis.tests.util.Wait; +import org.apache.activemq.artemis.utils.RetryRule; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; /** @@ -45,6 +47,8 @@ import org.junit.Test; */ public class FederatedAddressTest extends FederatedTestBase { + @Rule + public RetryRule retryRule = new RetryRule(2); @Override @Before @@ -298,7 +302,7 @@ public class FederatedAddressTest extends FederatedTestBase { 1000, 100)); final QueueBinding remoteQueueBinding = (QueueBinding) getServer(1).getPostOffice().getBindingsForAddress(SimpleString.toSimpleString(address)) .getBindings().iterator().next(); - assertEquals(1, remoteQueueBinding.getQueue().getConsumerCount()); + Wait.assertEquals(1, () -> remoteQueueBinding.getQueue().getConsumerCount()); producer1.send(session1.createTextMessage("hello")); assertNotNull(consumer0.receive(1000));