Override gateway.recover_after_master_nodes in test
By default gateway.recover_after_master_nodes is set to discovery.zen.minimum_master_nodes but in this Zen2 test this is set to an unreasonably large value. This change updates it so the cluster can properly form.
This commit is contained in:
parent
35e3d77e2c
commit
7b82c6c4cc
|
@ -36,6 +36,7 @@ import org.elasticsearch.common.settings.Settings;
|
|||
import org.elasticsearch.common.settings.Settings.Builder;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.discovery.zen.ElectMasterService;
|
||||
import org.elasticsearch.gateway.GatewayService;
|
||||
import org.elasticsearch.http.HttpServerTransport;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
|
@ -58,6 +59,7 @@ public class Zen2RestApiIT extends ESNetty4IntegTestCase {
|
|||
protected Settings nodeSettings(int nodeOrdinal) {
|
||||
final Builder builder = Settings.builder().put(super.nodeSettings(nodeOrdinal))
|
||||
.put(TestZenDiscovery.USE_ZEN2.getKey(), true)
|
||||
.put(GatewayService.RECOVER_AFTER_MASTER_NODES_SETTING.getKey(), 1)
|
||||
.put(ElectMasterService.DISCOVERY_ZEN_MINIMUM_MASTER_NODES_SETTING.getKey(), Integer.MAX_VALUE);
|
||||
|
||||
if (nodeOrdinal == 0) {
|
||||
|
|
Loading…
Reference in New Issue