Apache Lucene open-source search software
SOLR-6227: Avoid spurious failures of ChaosMonkeySafeLeaderTest by ensuring there's at least one jetty to kill
Shalin Shekhar Mangar98f75136096a
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex ad61abb63b8..0e63ccd0c88 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -882,6 +882,9 @@ Other Changes* SOLR-5918: ant clean does not remove ZooKeeper data (Varun Thacker, Steve Rowe)+* SOLR-6227: Avoid spurious failures of ChaosMonkeySafeLeaderTest by ensuring there's+ at least one jetty to kill. (shalin)+================== 4.10.3 ==================Bug Fixesdiff --git a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.javaindex 5df3dcb7f87..b7d815cb297 100644--- a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java@@ -92,7 +92,9 @@ public class ChaosMonkeySafeLeaderTest extends AbstractFullDistribZkTestBase {int numShards = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.shardcount", "-1"));if (numShards == -1) {- numShards = sliceCount + random().nextInt(TEST_NIGHTLY ? 12 : 2);+ // we make sure that there's at least one shard with more than one replica+ // so that the ChaosMonkey has something to kill+ numShards = sliceCount + random().nextInt(TEST_NIGHTLY ? 12 : 2) + 1;}fixShardCount(numShards);}