You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by tv...@apache.org on 2013/11/28 16:39:42 UTC

svn commit: r1546388 - /tomee/tomee/trunk/itests/failover/src/test/java/org/apache/openejb/itest/failover/RandomConnectionStrategyTest.java

Author: tveronezi
Date: Thu Nov 28 15:39:41 2013
New Revision: 1546388

URL: http://svn.apache.org/r1546388
Log:
Waiting for the "root" server to start before continuing the tests, otherwise test may fail in slower machines.

Modified:
    tomee/tomee/trunk/itests/failover/src/test/java/org/apache/openejb/itest/failover/RandomConnectionStrategyTest.java

Modified: tomee/tomee/trunk/itests/failover/src/test/java/org/apache/openejb/itest/failover/RandomConnectionStrategyTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/failover/src/test/java/org/apache/openejb/itest/failover/RandomConnectionStrategyTest.java?rev=1546388&r1=1546387&r2=1546388&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/failover/src/test/java/org/apache/openejb/itest/failover/RandomConnectionStrategyTest.java (original)
+++ tomee/tomee/trunk/itests/failover/src/test/java/org/apache/openejb/itest/failover/RandomConnectionStrategyTest.java Thu Nov 28 15:39:41 2013
@@ -97,7 +97,9 @@ public class RandomConnectionStrategyTes
             multipoint.set("discoveryName", name);
 
             logger.info("Starting Root server");
-            root.start();
+
+            // Wait for it to start before continuing, otherwise test may fail in slower machines.
+            root.start(1, TimeUnit.MINUTES);
         }
 
         final Services services = new Services();
@@ -209,11 +211,10 @@ public class RandomConnectionStrategyTes
         final double percent = 0.10;
         final int totalInvocations = size * expectedInvocations;
 
-
         // Verify the work reached all servers
         final Set<Map.Entry<String, AtomicInteger>> entries = invoke(bean, totalInvocations).entrySet();
 
-        Assert.assertEquals(size, entries.size());
+        Assert.assertEquals("Bad number of invocations for the bean \"" + bean.name() + "\".", size, entries.size());
 
         // And each server got a minimum of %10 percent of the traffic
         for (final Map.Entry<String, AtomicInteger> entry : entries) {