activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r524265 - /activemq/branches/activemq-4.1/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
Date Fri, 30 Mar 2007 20:40:52 GMT
Author: chirino
Date: Fri Mar 30 13:40:51 2007
New Revision: 524265

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

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

Modified: activemq/branches/activemq-4.1/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-4.1/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java?view=diff&rev=524265&r1=524264&r2=524265
==============================================================================
--- activemq/branches/activemq-4.1/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
(original)
+++ activemq/branches/activemq-4.1/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
Fri Mar 30 13:40:51 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