mirror of https://github.com/apache/lucene.git
SOLR-5417: The ChaosMonkey tests are not causing any disruption.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1538110 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
be0bb552ee
commit
d24357e87b
|
@ -67,6 +67,7 @@ import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
@ -547,8 +548,10 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
||||||
|
|
||||||
nextJetty:
|
nextJetty:
|
||||||
for (Slice slice : coll.getSlices()) {
|
for (Slice slice : coll.getSlices()) {
|
||||||
for (Replica replica : slice.getReplicas()) {
|
Set<Entry<String,Replica>> entries = slice.getReplicasMap().entrySet();
|
||||||
if (replica.getNodeName().contains(":" + port + "_")) {
|
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());
|
List<CloudJettyRunner> list = shardToJetty.get(slice.getName());
|
||||||
if (list == null) {
|
if (list == null) {
|
||||||
list = new ArrayList<CloudJettyRunner>();
|
list = new ArrayList<CloudJettyRunner>();
|
||||||
|
@ -559,7 +562,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
||||||
cjr.jetty = jetty;
|
cjr.jetty = jetty;
|
||||||
cjr.info = replica;
|
cjr.info = replica;
|
||||||
cjr.nodeName = replica.getStr(ZkStateReader.NODE_NAME_PROP);
|
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.url = replica.getStr(ZkStateReader.BASE_URL_PROP) + "/" + replica.getStr(ZkStateReader.CORE_NAME_PROP);
|
||||||
cjr.client = findClientByPort(port, theClients);
|
cjr.client = findClientByPort(port, theClients);
|
||||||
list.add(cjr);
|
list.add(cjr);
|
||||||
|
|
Loading…
Reference in New Issue