From 64669eda8b6483c97163fdbbdb48f6ff0461bfb3 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Fri, 30 Mar 2007 20:40:51 +0000 Subject: [PATCH] Make the test more forgiving of thread schedualing variations git-svn-id: https://svn.apache.org/repos/asf/activemq/branches/activemq-4.1@524265 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/RedeliveryPolicyTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java b/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java index 3719de9126..0418a60b23 100644 --- a/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java @@ -54,7 +54,7 @@ public class RedeliveryPolicyTest extends JmsTestSupport { connection.start(); Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE); - ActiveMQQueue destination = new ActiveMQQueue("TEST"); + ActiveMQQueue destination = new ActiveMQQueue(getName()); MessageProducer producer = session.createProducer(destination); MessageConsumer consumer = session.createConsumer(destination); @@ -79,7 +79,7 @@ public class RedeliveryPolicyTest extends JmsTestSupport { m = (TextMessage)consumer.receive(100); assertNull(m); - m = (TextMessage)consumer.receive(500); + m = (TextMessage)consumer.receive(700); assertNotNull(m); assertEquals("1st", m.getText()); session.rollback(); @@ -89,7 +89,7 @@ public class RedeliveryPolicyTest extends JmsTestSupport { assertNull(m); m = (TextMessage)consumer.receive(500); assertNull(m); - m = (TextMessage)consumer.receive(500); + m = (TextMessage)consumer.receive(700); assertNotNull(m); assertEquals("1st", m.getText()); @@ -107,7 +107,7 @@ public class RedeliveryPolicyTest extends JmsTestSupport { connection.start(); Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE); - ActiveMQQueue destination = new ActiveMQQueue("TEST"); + ActiveMQQueue destination = new ActiveMQQueue(getName()); MessageProducer producer = session.createProducer(destination); MessageConsumer consumer = session.createConsumer(destination); @@ -131,7 +131,7 @@ public class RedeliveryPolicyTest extends JmsTestSupport { // Show subsequent re-delivery delay is incrementing. m = (TextMessage)consumer.receive(100); assertNull(m); - m = (TextMessage)consumer.receive(500); + m = (TextMessage)consumer.receive(700); assertNotNull(m); assertEquals("1st", m.getText()); session.rollback(); @@ -140,7 +140,7 @@ public class RedeliveryPolicyTest extends JmsTestSupport { // we are not using exponential backoff. m = (TextMessage)consumer.receive(100); assertNull(m); - m = (TextMessage)consumer.receive(500); + m = (TextMessage)consumer.receive(700); assertNotNull(m); assertEquals("1st", m.getText());