[TEST] only bump replicas if we have enough nodes in the cluster
This commit is contained in:
parent
6797d73d7e
commit
e4b7395026
|
@ -210,7 +210,7 @@ public class SnapshotBackwardsCompatibilityTest extends ElasticsearchBackwardsCo
|
|||
} while (upgraded);
|
||||
client().admin().indices().prepareUpdateSettings("test").setSettings(ImmutableSettings.builder().put(EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE, "all")).get();
|
||||
}
|
||||
if (randomBoolean()) {
|
||||
if (cluster().numDataNodes() > 1 && randomBoolean()) { // only bump the replicas if we have enough nodes
|
||||
client().admin().indices().prepareUpdateSettings("test").setSettings(ImmutableSettings.builder().put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, randomIntBetween(1,2))).get();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue