[Test] GoogleCloudStorageFixture command line is too long on Windows (#28991)

Windows has some strong limitations on command line arguments,
specially when it's too long. In the googlecloudstoragefixture anttask
the classpath argument is very long and the command fails. This commit
removes the classpath as an argument and uses the CLASSPATH
environment variable instead.
This commit is contained in:
Tanguy Leroux 2018-03-12 18:02:30 +01:00 committed by GitHub
parent 6331bcaf76
commit 5a65db153e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -60,11 +60,10 @@ thirdPartyAudit.excludes = [
/** A task to start the GoogleCloudStorageFixture which emulates a Google Cloud Storage service **/
task googleCloudStorageFixture(type: AntFixture) {
dependsOn compileTestJava
executable = new File(project.runtimeJavaHome, 'bin/java')
args '-cp', "${ -> project.sourceSets.test.runtimeClasspath.asPath }",
'org.elasticsearch.repositories.gcs.GoogleCloudStorageFixture',
baseDir, 'bucket_test'
dependsOn compileTestJava
env 'CLASSPATH', "${ -> project.sourceSets.test.runtimeClasspath.asPath }"
executable = new File(project.runtimeJavaHome, 'bin/java')
args 'org.elasticsearch.repositories.gcs.GoogleCloudStorageFixture', baseDir, 'bucket_test'
}
/** A service account file that points to the Google Cloud Storage service emulated by the fixture **/