From c0300c318c3d26752610b2baffdbaef9d1e8cff9 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Tue, 30 Apr 2019 13:33:45 -0400 Subject: [PATCH] NO-JIRA Test fix --- .../artemis/tests/integration/paging/GlobalPagingTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/GlobalPagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/GlobalPagingTest.java index 10cf532e53..856d76781f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/GlobalPagingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/GlobalPagingTest.java @@ -46,6 +46,7 @@ import org.apache.activemq.artemis.core.server.Queue; import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; +import org.apache.activemq.artemis.junit.Wait; import org.junit.Assert; import org.junit.Before; import org.junit.Ignore; @@ -334,7 +335,8 @@ public class GlobalPagingTest extends PagingTest { final MessageReference reference = MessageReference.Factory.createReference(session.createMessage(false), queue); //it will cause QueueImpl::directDeliver -> false queue.addHead(reference, false); - Assert.assertSame(reference, queue.removeReferenceWithID(reference.getMessageID())); + Wait.assertFalse(queue::isDirectDeliver); + Wait.assertTrue(() -> queue.removeReferenceWithID(reference.getMessageID()) != null); ClientMessage message = session.createMessage(false); message.putStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME, replyQueue); ManagementHelper.putAttribute(message, "queue." + address.toString(), "messageCount");