camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmuel...@apache.org
Subject svn commit: r1382476 - /camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperElectionTest.java
Date Sun, 09 Sep 2012 12:13:49 GMT
Author: cmueller
Date: Sun Sep  9 12:13:48 2012
New Revision: 1382476

URL: http://svn.apache.org/viewvc?rev=1382476&view=rev
Log:
fixed test which randomly fail on slow CI server

Modified:
    camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperElectionTest.java

Modified: camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperElectionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperElectionTest.java?rev=1382476&r1=1382475&r2=1382476&view=diff
==============================================================================
--- camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperElectionTest.java
(original)
+++ camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperElectionTest.java
Sun Sep  9 12:13:48 2012
@@ -75,7 +75,6 @@ public class ZookeeperElectionTest exten
         LOG.debug("About to shutdown the first candidate.");
 
         candidateOneContext.stop(); // the first candidate was killed.
-
         assertIsMaster(electionCandidate2);
     }
 
@@ -86,10 +85,9 @@ public class ZookeeperElectionTest exten
 
         ZooKeeperElection electionCandidate1 = createElectionCandidate(candidateOneContext,
2);
         assertTrue("The first candidate was not elected.", electionCandidate1.isMaster());
+        
         ZooKeeperElection electionCandidate2 = createElectionCandidate(candidateTwoContext,
2);
-        // Need to wait for a while to Candidate2 to be elected.
-        Thread.sleep(3000);
-        assertTrue("The second candidate should also be a master.", electionCandidate2.isMaster());
+        assertIsMaster(electionCandidate2);
     }
 
     @Test



Mime
View raw message