[TEST] use routing partition size based on the max routing shards of the second split

This commit is contained in:
Simon Willnauer 2017-11-23 17:59:07 +01:00
parent e95d18ec23
commit 93a988c557
1 changed files with 2 additions and 1 deletions

View File

@ -120,8 +120,9 @@ public class SplitIndexIT extends ESIntegTestCase {
useRoutingPartition = randomBoolean();
}
if (useRouting && useMixedRouting == false && useRoutingPartition) {
int numRoutingShards = MetaDataCreateIndexService.calculateNumRoutingShards(secondSplitShards, Version.CURRENT)-1;
settings.put("index.routing_partition_size",
randomIntBetween(1, MetaDataCreateIndexService.calculateNumRoutingShards(sourceShards, Version.CURRENT)-1));
randomIntBetween(1, numRoutingShards));
if (useNested) {
createInitialIndex.addMapping("t1", "_routing", "required=true", "nested1", "type=nested");
} else {