Use zen2 with testclusters (#37352)

This commit is contained in:
Alpar Torok 2019-01-21 12:52:25 +02:00 committed by GitHub
parent 09a6ba50ef
commit 3a2b616579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -324,8 +324,9 @@ public class ElasticsearchNode {
getConfPathSharedData().mkdirs();
getConfPathLogs().mkdirs();
LinkedHashMap<String, String> config = new LinkedHashMap<>();
config.put("cluster.name", "cluster-" + safeName(name));
config.put("node.name", "node-" + safeName(name));
String nodeName = safeName(name);
config.put("cluster.name",nodeName);
config.put("node.name", nodeName);
config.put("path.repo", getConfPathRepo().getAbsolutePath());
config.put("path.data", getConfPathData().getAbsolutePath());
config.put("path.logs", getConfPathLogs().getAbsolutePath());
@ -342,6 +343,9 @@ public class ElasticsearchNode {
if (Version.fromString(version).getMajor() >= 6) {
config.put("cluster.routing.allocation.disk.watermark.flood_stage", "1b");
}
if (Version.fromString(version).getMajor() >= 7) {
config.put("cluster.initial_master_nodes", "[" + nodeName + "]");
}
try {
Files.write(
getConfigFile().toPath(),

View File

@ -21,11 +21,9 @@ package org.elasticsearch.gradle.testclusters;
import org.elasticsearch.gradle.test.GradleIntegrationTestCase;
import org.gradle.testkit.runner.BuildResult;
import org.gradle.testkit.runner.GradleRunner;
import org.junit.Ignore;
import java.util.Arrays;
@Ignore // https://github.com/elastic/elasticsearch/issues/37218
public class TestClustersPluginIT extends GradleIntegrationTestCase {
public void testListClusters() {