Skip to content

Commit 3e078b2

Browse files
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 bc0fe7d commit 3e078b2

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
@@ -687,8 +687,7 @@ class ClusterFormationTasks {
687687
static Task configureExecTask(String name, Project project, Task setup, NodeInfo node, Object[] execArgs) {
688688
return project.tasks.create(name: name, type: LoggedExec, dependsOn: setup) { Exec exec ->
689689
exec.workingDir node.cwd
690-
// TODO: this must change to 7.0.0 after bundling java has been backported
691-
if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("8.0.0")) ||
690+
if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("7.0.0")) ||
692691
node.config.distribution == 'integ-test-zip') {
693692
exec.environment.put('JAVA_HOME', project.runtimeJavaHome)
694693
} else {
@@ -714,7 +713,7 @@ class ClusterFormationTasks {
714713
ant.exec(executable: node.executable, spawn: node.config.daemonize, newenvironment: true,
715714
dir: node.cwd, taskname: 'elasticsearch') {
716715
node.env.each { key, value -> env(key: key, value: value) }
717-
if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("8.0.0")) ||
716+
if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("7.0.0")) ||
718717
node.config.distribution == 'integ-test-zip') {
719718
env(key: 'JAVA_HOME', value: project.runtimeJavaHome)
720719
}

0 commit comments

Comments
 (0)