Skip to content

Commit c1270e9

Browse files
authored
Zen2ify testMasterFailoverDuringIndexingWithMappingChanges (#38178)
In Zen2 cluster bootstrap is required and some parameters are called differently in Zen2.
1 parent 19dccf8 commit c1270e9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

server/src/test/java/org/elasticsearch/action/support/master/IndexingMasterFailoverIT.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.elasticsearch.action.index.IndexResponse;
2424
import org.elasticsearch.common.settings.Settings;
2525
import org.elasticsearch.discovery.DiscoverySettings;
26-
import org.elasticsearch.discovery.zen.ElectMasterService;
2726
import org.elasticsearch.discovery.zen.FaultDetection;
2827
import org.elasticsearch.plugins.Plugin;
2928
import org.elasticsearch.test.ESIntegTestCase;
@@ -72,12 +71,12 @@ public void testMasterFailoverDuringIndexingWithMappingChanges() throws Throwabl
7271
final Settings sharedSettings = Settings.builder()
7372
.put(FaultDetection.PING_TIMEOUT_SETTING.getKey(), "1s") // for hitting simulated network failures quickly
7473
.put(FaultDetection.PING_RETRIES_SETTING.getKey(), "1") // for hitting simulated network failures quickly
75-
.put(TestZenDiscovery.USE_ZEN2.getKey(), false)
76-
.put("discovery.zen.join_timeout", "10s") // still long to induce failures but to long so test won't time out
74+
.put("cluster.join.timeout", "10s") // still long to induce failures but not too long so test won't time out
7775
.put(DiscoverySettings.PUBLISH_TIMEOUT_SETTING.getKey(), "1s") // <-- for hitting simulated network failures quickly
78-
.put(ElectMasterService.DISCOVERY_ZEN_MINIMUM_MASTER_NODES_SETTING.getKey(), 2)
7976
.build();
8077

78+
internalCluster().setBootstrapMasterNodeIndex(2);
79+
8180
internalCluster().startMasterOnlyNodes(3, sharedSettings);
8281

8382
String dataNode = internalCluster().startDataOnlyNode(sharedSettings);

0 commit comments

Comments
 (0)