lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1178208 - /lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
Date Sun, 02 Oct 2011 17:43:58 GMT
Author: markrmiller
Date: Sun Oct  2 17:43:58 2011
New Revision: 1178208

URL: http://svn.apache.org/viewvc?rev=1178208&view=rev
Log:
harden this test a bit in terms of timing

Modified:
    lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java

Modified: lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java?rev=1178208&r1=1178207&r2=1178208&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
(original)
+++ lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
Sun Oct  2 17:43:58 2011
@@ -248,6 +248,14 @@ public class LeaderElectionTest extends 
     String leader = null;
     int tries = 30;
     while (true) {
+      if (!zkClient.exists("/collections/collection1/leader_elect/shard1/leader")) {
+        if (tries-- == 0) {
+          printLayout(server.getZkAddress());
+          fail("No registered leader was found");
+        }
+        Thread.sleep(1000);
+        continue;
+      }
       List<String> leaderChildren = zkClient.getChildren(
           "/collections/collection1/leader_elect/shard1/leader", null);
       if (leaderChildren.size() > 0) {



Mime
View raw message