Fix default distro bwc tests

This commit is contained in:
Alpar Torok 2019-10-04 09:44:17 +03:00
parent 97a0b7dcbc
commit 67bf3a4f51
1 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,7 @@
import org.elasticsearch.gradle.Version import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.testclusters.RestTestRunnerTask import org.elasticsearch.gradle.testclusters.RestTestRunnerTask
import org.elasticsearch.gradle.testclusters.TestDistribution
apply plugin: 'elasticsearch.standalone-test' apply plugin: 'elasticsearch.standalone-test'
apply plugin: 'elasticsearch.testclusters' apply plugin: 'elasticsearch.testclusters'
@ -35,13 +36,18 @@ for (Version bwcVersion : bwcVersions.indexCompatible) {
String baseName = "v${bwcVersion}" String baseName = "v${bwcVersion}"
testClusters { testClusters {
String configuredTestDistribution = System.getProperty('tests.distribution', 'oss').toUpperCase()
"${baseName}" { "${baseName}" {
testDistribution = configuredTestDistribution
versions = [ bwcVersion.toString(), project.version ] versions = [ bwcVersion.toString(), project.version ]
numberOfNodes = 2 numberOfNodes = 2
// some tests rely on the translog not being flushed // some tests rely on the translog not being flushed
setting 'indices.memory.shard_inactive_time', '20m' setting 'indices.memory.shard_inactive_time', '20m'
setting 'http.content_type.required', 'true' setting 'http.content_type.required', 'true'
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}" setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
if (configuredTestDistribution.equals("DEFAULT")) {
setting "xpack.security.enabled", "false"
}
javaHome = project.file(project.ext.runtimeJavaHome) javaHome = project.file(project.ext.runtimeJavaHome)
} }
} }