lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1423507 - /lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
Date Tue, 18 Dec 2012 16:11:19 GMT
Author: markrmiller
Date: Tue Dec 18 16:11:18 2012
New Revision: 1423507

URL: http://svn.apache.org/viewvc?rev=1423507&view=rev
Log:
harden test

Modified:
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java?rev=1423507&r1=1423506&r2=1423507&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java Tue Dec 18
16:11:18 2012
@@ -303,10 +303,13 @@ public class OverseerTest extends SolrTe
         reader.updateClusterState(true);
         ClusterState state = reader.getClusterState();
         Map<String,Slice> slices = state.getSlicesMap("collection1");
-        for (String name : slices.keySet()) {
-          cloudStateSliceCount += slices.get(name).getReplicasMap().size();
+        if (slices != null) {
+          for (String name : slices.keySet()) {
+            cloudStateSliceCount += slices.get(name).getReplicasMap().size();
+          }
+          if (coreCount == cloudStateSliceCount) break;
         }
-        if (coreCount == cloudStateSliceCount) break;
+
         Thread.sleep(200);
       }
       assertEquals("Unable to verify all cores have been assigned an id in cloudstate", 



Mime
View raw message