activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r524266 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
Date Fri, 30 Mar 2007 20:42:49 GMT
Author: chirino
Date: Fri Mar 30 13:42:49 2007
New Revision: 524266

URL: http://svn.apache.org/viewvc?view=rev&rev=524266
Log:
Make the test more forgiving of thread schedualing variations

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java?view=diff&rev=524266&r1=524265&r2=524266
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
Fri Mar 30 13:42:49 2007
@@ -54,7 +54,7 @@
         
         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 @@
         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 @@
         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 @@
         
         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 @@
         // 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 @@
         // 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());        
         



Mime
View raw message