Skip to content

Commit a28e36c

Browse files
jasontedorGurkan Kaymak
authored and
Gurkan Kaymak
committed
Use bundled Java for all eligible versions in tests (elastic#40928)
This commit sets the version to ensure that we use the bundled Java when running integration tests for all eligible versions. In particular, since we started bundling Java with 7.0.0, this commits sets said version to 7.0.0.
1 parent 1d1d1ea commit a28e36c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,7 @@ class ClusterFormationTasks {
663663
static Task configureExecTask(String name, Project project, Task setup, NodeInfo node, Object[] execArgs) {
664664
return project.tasks.create(name: name, type: LoggedExec, dependsOn: setup) { Exec exec ->
665665
exec.workingDir node.cwd
666-
// TODO: this must change to 7.0.0 after bundling java has been backported
667-
if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("8.0.0")) ||
666+
if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("7.0.0")) ||
668667
node.config.distribution == 'integ-test-zip') {
669668
exec.environment.put('JAVA_HOME', project.runtimeJavaHome)
670669
} else {
@@ -690,7 +689,7 @@ class ClusterFormationTasks {
690689
ant.exec(executable: node.executable, spawn: node.config.daemonize, newenvironment: true,
691690
dir: node.cwd, taskname: 'elasticsearch') {
692691
node.env.each { key, value -> env(key: key, value: value) }
693-
if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("8.0.0")) ||
692+
if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("7.0.0")) ||
694693
node.config.distribution == 'integ-test-zip') {
695694
env(key: 'JAVA_HOME', value: project.runtimeJavaHome)
696695
}

0 commit comments

Comments
 (0)