lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1559608 - in /lucene/dev/branches/lucene_solr_4_6: ./ solr/ solr/core/ solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
Date Sun, 19 Jan 2014 23:47:55 GMT
Author: markrmiller
Date: Sun Jan 19 23:47:54 2014
New Revision: 1559608

URL: http://svn.apache.org/r1559608
Log:
SOLR-5608: Harden test.

Modified:
    lucene/dev/branches/lucene_solr_4_6/   (props changed)
    lucene/dev/branches/lucene_solr_4_6/solr/   (props changed)
    lucene/dev/branches/lucene_solr_4_6/solr/core/   (props changed)
    lucene/dev/branches/lucene_solr_4_6/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java

Modified: lucene/dev/branches/lucene_solr_4_6/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_6/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java?rev=1559608&r1=1559607&r2=1559608&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_6/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
(original)
+++ lucene/dev/branches/lucene_solr_4_6/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
Sun Jan 19 23:47:54 2014
@@ -362,10 +362,10 @@ public class CollectionsAPIDistributedZk
     String baseUrl = getBaseUrl((HttpSolrServer) clients.get(0));
     // now try to remove a collection when a couple of it's nodes are down
     if (secondConfigSet) {
-      createCollection(null, "halfdeletedcollection2", 3, 2, 6,
+      createCollection(null, "halfdeletedcollection2", 3, 3, 6,
           createNewSolrServer("", baseUrl), null, "conf2");
     } else {
-      createCollection(null, "halfdeletedcollection2", 3, 2, 6,
+      createCollection(null, "halfdeletedcollection2", 3, 3, 6,
           createNewSolrServer("", baseUrl), null);
     }
     
@@ -375,6 +375,11 @@ public class CollectionsAPIDistributedZk
     ChaosMonkey.stop(jettys.get(0));
     ChaosMonkey.stop(jettys.get(1));
     
+    // wait for leaders to settle out
+    for (int i = 1; i < 4; i++) {
+      cloudClient.getZkStateReader().getLeaderRetry("halfdeletedcollection2", "shard" + i,
15000);
+    }
+    
     baseUrl = getBaseUrl((HttpSolrServer) clients.get(2));
     
     // remove a collection
@@ -387,8 +392,8 @@ public class CollectionsAPIDistributedZk
     createNewSolrServer("", baseUrl).request(request);
     
     cloudClient.getZkStateReader().updateClusterState(true);
-    assertFalse(cloudClient.getZkStateReader().getClusterState()
-        .getCollections().contains("halfdeletedcollection2"));
+
+    assertFalse("Still found collection that should be gone", cloudClient.getZkStateReader().getClusterState().hasCollection("halfdeletedcollection2"));
     
   }
 



Mime
View raw message