NO-JIRA fix timing issue in test

This commit is contained in:
Justin Bertram 2017-10-25 10:12:29 -05:00
parent c2f0c152cc
commit ac73f38d3d
1 changed files with 3 additions and 0 deletions

View File

@ -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);