activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r387563 - /incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTest.java
Date Tue, 21 Mar 2006 16:09:34 GMT
Author: chirino
Date: Tue Mar 21 08:09:33 2006
New Revision: 387563

URL: http://svn.apache.org/viewcvs?rev=387563&view=rev
Log:
Allow previous messages to drain before doing the real test.  (makes the test more reliable)

Modified:
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTest.java

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTest.java?rev=387563&r1=387562&r2=387563&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTest.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTest.java
Tue Mar 21 08:09:33 2006
@@ -95,11 +95,14 @@
         assertTrue("Found a valid consumer", consumer != null);
 
         consumer.start();
+        
+        // Wait a little to drain any left over messages.
+        Thread.sleep(1000);
+        consumer.flushMessages();
 
         producer = (SpringProducer) context.getBean("producer");
         assertTrue("Found a valid producer", producer != null);
 
-        consumer.flushMessages();
         producer.start();
 
         // lets sleep a little to give the JMS time to dispatch stuff



Mime
View raw message