From ac73f38d3d74789a6e369416edf982b31553f696 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Wed, 25 Oct 2017 10:12:29 -0500 Subject: [PATCH] NO-JIRA fix timing issue in test --- .../artemis/tests/integration/amqp/JMSMessageConsumerTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSMessageConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSMessageConsumerTest.java index 5d6ee47b76..b290d09880 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSMessageConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSMessageConsumerTest.java @@ -444,6 +444,9 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport { message1.setText("filtered"); producer.send(message1, DeliveryMode.PERSISTENT, Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE); + // short delay to prevent the timestamps from being the same + Thread.sleep(2); + TextMessage message2 = session.createTextMessage(); message2.setText("expected"); producer.send(message2, DeliveryMode.PERSISTENT, Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);