camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r583809 - /activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java
Date Thu, 11 Oct 2007 12:53:25 GMT
Author: jstrachan
Date: Thu Oct 11 05:53:24 2007
New Revision: 583809

URL: http://svn.apache.org/viewvc?rev=583809&view=rev
Log:
deal with slow boxes :)

Modified:
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java?rev=583809&r1=583808&r2=583809&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java
(original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java
Thu Oct 11 05:53:24 2007
@@ -32,20 +32,22 @@
  * @version $Revision: 574458 $
  */
 public class JmsDiscoveryTest extends ContextTestSupport {
-
     protected MyRegistry registry = new MyRegistry();
 
     public void testDiscovery() throws Exception {
         // lets wait to see if we get 3 services
-
-        Thread.sleep(3000);
+        for (int i = 0; i < 15; i++) {
+            Thread.sleep(1000);
+            if (registry.getServices().size() == 3) {
+                break;
+            }
+        }
 
         Map<String, Map> map = new HashMap<String, Map>(registry.getServices());
         System.out.println("Received map: " + map);
 
         assertEquals("Size of map: " + map, 3, map.size());
     }
-
 
     protected CamelContext createCamelContext() throws Exception {
         CamelContext camelContext = super.createCamelContext();



Mime
View raw message