lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1538111 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/test-framework/ solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
Date Sat, 02 Nov 2013 00:45:54 GMT
Author: markrmiller
Date: Sat Nov  2 00:45:54 2013
New Revision: 1538111

URL: http://svn.apache.org/r1538111
Log:
SOLR-5417: The ChaosMonkey tests are not causing any disruption.

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/test-framework/   (props changed)
    lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java

Modified: lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java?rev=1538111&r1=1538110&r2=1538111&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
(original)
+++ lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
Sat Nov  2 00:45:54 2013
@@ -67,6 +67,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Random;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -547,8 +548,10 @@ public abstract class AbstractFullDistri
       
       nextJetty:
       for (Slice slice : coll.getSlices()) {
-        for (Replica replica : slice.getReplicas()) {
-          if (replica.getNodeName().contains(":" + port + "_")) {
+        Set<Entry<String,Replica>> entries = slice.getReplicasMap().entrySet();
+        for (Entry<String,Replica> entry : entries) {
+          Replica replica = entry.getValue();
+          if (replica.getStr(ZkStateReader.BASE_URL_PROP).contains(":" + port)) {
             List<CloudJettyRunner> list = shardToJetty.get(slice.getName());
             if (list == null) {
               list = new ArrayList<CloudJettyRunner>();
@@ -559,7 +562,7 @@ public abstract class AbstractFullDistri
             cjr.jetty = jetty;
             cjr.info = replica;
             cjr.nodeName = replica.getStr(ZkStateReader.NODE_NAME_PROP);
-            cjr.coreNodeName = replica.getNodeName();
+            cjr.coreNodeName = entry.getKey();
             cjr.url = replica.getStr(ZkStateReader.BASE_URL_PROP) + "/" + replica.getStr(ZkStateReader.CORE_NAME_PROP);
             cjr.client = findClientByPort(port, theClients);
             list.add(cjr);



Mime
View raw message