Fix bwc testcluster setup against elastic < 6.3

This commit is contained in:
Rene Groeschke 2020-08-31 11:06:12 +02:00
parent 5c86b216e8
commit 0d488cfbb9
No known key found for this signature in database
GPG Key ID: B1782D97CBC64567
1 changed files with 7 additions and 2 deletions

View File

@ -453,7 +453,7 @@ public class ElasticsearchNode implements TestClusterConfiguration {
pluginsToInstall.addAll(plugins.stream().map(Provider::get).map(URI::toString).collect(Collectors.toList()));
}
if (getVersion().before("6.3.0") && testDistribution == TestDistribution.DEFAULT) {
if (requiresAddingXPack()) {
logToProcessStdout("emulating the " + testDistribution + " flavor for " + getVersion() + " by installing x-pack");
pluginsToInstall.add("x-pack");
}
@ -524,8 +524,13 @@ public class ElasticsearchNode implements TestClusterConfiguration {
startElasticsearchProcess();
}
private boolean requiresAddingXPack() {
boolean b = getVersion().before("6.3.0") && testDistribution == TestDistribution.DEFAULT;
return getVersion().before("6.3.0") && testDistribution == TestDistribution.DEFAULT;
}
private boolean canUseSharedDistribution() {
return extraJarFiles.size() == 0 && modules.size() == 0 && plugins.size() == 0;
return extraJarFiles.size() == 0 && modules.size() == 0 && plugins.size() == 0 && !requiresAddingXPack();
}
private void logToProcessStdout(String message) {