fix the monkey: connection loss and expiration cause NPE

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1366969 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-07-30 00:42:46 +00:00
parent 08baaf03e5
commit 3d9e8b745f
1 changed files with 4 additions and 4 deletions

View File

@ -99,9 +99,9 @@ public class ChaosMonkey {
public void expireRandomSession() throws KeeperException, InterruptedException {
String sliceName = getRandomSlice();
JettySolrRunner jetty = getRandomJetty(sliceName, aggressivelyKillLeaders).jetty;
CloudJettyRunner jetty = getRandomJetty(sliceName, aggressivelyKillLeaders);
if (jetty != null) {
expireSession(jetty);
expireSession(jetty.jetty);
expires.incrementAndGet();
}
}
@ -110,9 +110,9 @@ public class ChaosMonkey {
monkeyLog("cause connection loss!");
String sliceName = getRandomSlice();
JettySolrRunner jetty = getRandomJetty(sliceName, aggressivelyKillLeaders).jetty;
CloudJettyRunner jetty = getRandomJetty(sliceName, aggressivelyKillLeaders);
if (jetty != null) {
causeConnectionLoss(jetty);
causeConnectionLoss(jetty.jetty);
connloss.incrementAndGet();
}
}