Use bundled Java for all eligible versions in tests (#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.
This commit is contained in:
Jason Tedor 2019-04-08 08:15:05 -04:00
parent bc0fe7d64d
commit 3e078b2026
No known key found for this signature in database
GPG Key ID: FA89F05560F16BC5
1 changed files with 2 additions and 3 deletions

View File

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