[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:
parent
6331bcaf76
commit
5a65db153e
|
@ -60,11 +60,10 @@ thirdPartyAudit.excludes = [
|
||||||
|
|
||||||
/** A task to start the GoogleCloudStorageFixture which emulates a Google Cloud Storage service **/
|
/** A task to start the GoogleCloudStorageFixture which emulates a Google Cloud Storage service **/
|
||||||
task googleCloudStorageFixture(type: AntFixture) {
|
task googleCloudStorageFixture(type: AntFixture) {
|
||||||
dependsOn compileTestJava
|
dependsOn compileTestJava
|
||||||
executable = new File(project.runtimeJavaHome, 'bin/java')
|
env 'CLASSPATH', "${ -> project.sourceSets.test.runtimeClasspath.asPath }"
|
||||||
args '-cp', "${ -> project.sourceSets.test.runtimeClasspath.asPath }",
|
executable = new File(project.runtimeJavaHome, 'bin/java')
|
||||||
'org.elasticsearch.repositories.gcs.GoogleCloudStorageFixture',
|
args 'org.elasticsearch.repositories.gcs.GoogleCloudStorageFixture', baseDir, 'bucket_test'
|
||||||
baseDir, 'bucket_test'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A service account file that points to the Google Cloud Storage service emulated by the fixture **/
|
/** A service account file that points to the Google Cloud Storage service emulated by the fixture **/
|
||||||
|
|
Loading…
Reference in New Issue