Skip reindex tests from old es if we can't run it
Two of the versions of Elasticsearch we need to run for these tests can't run in Java 9 so we skip the entire test if we are running in java 9. For now. I'd like to reenable it to run against java 8 if there is one available, but that can wait for another time. Relates to #24561
This commit is contained in:
parent
c1f1f66509
commit
2ffdd4468d
|
@ -49,34 +49,41 @@ dependencies {
|
||||||
es090 'org.elasticsearch:elasticsearch:0.90.13@zip'
|
es090 'org.elasticsearch:elasticsearch:0.90.13@zip'
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up tasks to unzip and run the old versions of ES before running the
|
if (project.javaVersion == JavaVersion.VERSION_1_9) {
|
||||||
* integration tests. */
|
/* We can't run the dependencies with Java 9 so for now we'll skip the whole
|
||||||
for (String version : ['2', '1', '090']) {
|
* thing. */
|
||||||
Task unzip = task("unzipEs${version}", type: Sync) {
|
integTest.enabled = false
|
||||||
Configuration oldEsDependency = configurations['es' + version]
|
} else {
|
||||||
dependsOn oldEsDependency
|
/* Set up tasks to unzip and run the old versions of ES before running the
|
||||||
// Use a closure here to delay resolution of the dependency until we need it
|
* integration tests. */
|
||||||
from {
|
for (String version : ['2', '1', '090']) {
|
||||||
oldEsDependency.collect { zipTree(it) }
|
Task unzip = task("unzipEs${version}", type: Sync) {
|
||||||
|
Configuration oldEsDependency = configurations['es' + version]
|
||||||
|
dependsOn oldEsDependency
|
||||||
|
/* Use a closure here to delay resolution of the dependency until we need
|
||||||
|
* it */
|
||||||
|
from {
|
||||||
|
oldEsDependency.collect { zipTree(it) }
|
||||||
|
}
|
||||||
|
into temporaryDir
|
||||||
|
}
|
||||||
|
Task fixture = task("oldEs${version}Fixture",
|
||||||
|
type: org.elasticsearch.gradle.test.AntFixture) {
|
||||||
|
dependsOn project.configurations.oldesFixture
|
||||||
|
dependsOn unzip
|
||||||
|
executable = new File(project.javaHome, 'bin/java')
|
||||||
|
env 'CLASSPATH', "${ -> project.configurations.oldesFixture.asPath }"
|
||||||
|
args 'oldes.OldElasticsearch',
|
||||||
|
baseDir,
|
||||||
|
unzip.temporaryDir,
|
||||||
|
version == '090'
|
||||||
|
}
|
||||||
|
integTest.dependsOn fixture
|
||||||
|
integTestRunner {
|
||||||
|
/* Use a closure on the string to delay evaluation until right before we
|
||||||
|
* run the integration tests so that we can be sure that the file is
|
||||||
|
* ready. */
|
||||||
|
systemProperty "es${version}.port", "${ -> fixture.addressAndPort }"
|
||||||
}
|
}
|
||||||
into temporaryDir
|
|
||||||
}
|
|
||||||
Task fixture = task("oldEs${version}Fixture",
|
|
||||||
type: org.elasticsearch.gradle.test.AntFixture) {
|
|
||||||
dependsOn project.configurations.oldesFixture
|
|
||||||
dependsOn unzip
|
|
||||||
executable = new File(project.javaHome, 'bin/java')
|
|
||||||
env 'CLASSPATH', "${ -> project.configurations.oldesFixture.asPath }"
|
|
||||||
args 'oldes.OldElasticsearch',
|
|
||||||
baseDir,
|
|
||||||
unzip.temporaryDir,
|
|
||||||
version == '090'
|
|
||||||
}
|
|
||||||
integTest.dependsOn fixture
|
|
||||||
integTestRunner {
|
|
||||||
/* Use a closure on the string to delay evaluation until right before we
|
|
||||||
* run the integration tests so that we can be sure that the file is ready.
|
|
||||||
*/
|
|
||||||
systemProperty "es${version}.port", "${ -> fixture.addressAndPort }"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue