make test more tolerant to slow machines

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@796694 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-07-22 13:10:31 +00:00
parent fb42a11835
commit 5a0f76d0f2
1 changed files with 2 additions and 2 deletions

View File

@ -883,7 +883,7 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
// let first bunch in queue expire // let first bunch in queue expire
Thread.sleep(1000); Thread.sleep(2000);
producer.setTimeToLive(0); producer.setTimeToLive(0);
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
@ -896,7 +896,7 @@ public class JMSConsumerTest extends JmsTestSupport {
for(int i=0; i<count; i++) { for(int i=0; i<count; i++) {
TextMessage msg = (TextMessage) amqConsumer.receive(); TextMessage msg = (TextMessage) amqConsumer.receive();
assertNotNull(msg); assertNotNull(msg);
assertTrue(msg.getText().contains("no expiry")); assertTrue("message has \"no expiry\" text: " + msg.getText(), msg.getText().contains("no expiry"));
// force an ack when there are expired messages // force an ack when there are expired messages
amqConsumer.acknowledge(); amqConsumer.acknowledge();