SOLR-6227: Avoid spurious failures of ChaosMonkeySafeLeaderTest by ensuring there's at least one jetty to kill

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1657487 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2015-02-05 06:33:28 +00:00
parent 639f72ee71
commit 98f7513609
2 changed files with 6 additions and 1 deletions

View File

@ -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 Fixes

View File

@ -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);
}