@@ -138,7 +138,7 @@ ext {
138
138
cluster. setting name, value
139
139
}
140
140
141
- cluster. plugin provider(( Callable< RegularFile > ) (() -> (RegularFile ) (() -> downloadedSecurityPlugin)))
141
+ cluster. plugin provider { (RegularFile ) (() -> downloadedSecurityPlugin )}
142
142
}
143
143
144
144
bwcOpenSearchJSDownload = ' https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/' + baseVersion + ' /latest/linux/x64/tar/builds/' +
@@ -230,19 +230,11 @@ testClusters.all {
230
230
}
231
231
232
232
def getJobSchedulerPlugin () {
233
- provider(new Callable<RegularFile > () {
234
- @Override
235
- RegularFile call () throws Exception {
236
- return new RegularFile () {
237
- @Override
238
- File getAsFile () {
239
- return configurations. zipArchive. asFileTree. matching {
240
- include ' **/opensearch-job-scheduler*'
241
- }. singleFile
242
- }
243
- }
244
- }
245
- })
233
+ provider { (RegularFile ) (() ->
234
+ configurations. zipArchive. asFileTree. matching {
235
+ include ' **/opensearch-job-scheduler*'
236
+ }. singleFile )
237
+ }
246
238
}
247
239
248
240
def getGeoSpatialPlugin () {
@@ -543,37 +535,21 @@ task comparisonTest(type: RestIntegTestTask) {
543
535
testDistribution = " ARCHIVE"
544
536
versions = [baseVersion, opensearch_version]
545
537
numberOfNodes = 3
546
- plugin(provider(new Callable<RegularFile > (){
547
- @Override
548
- RegularFile call () throws Exception {
549
- return new RegularFile () {
550
- @Override
551
- File getAsFile () {
552
- if (new File (" $project . rootDir /$bwcFilePath /job-scheduler/$bwcVersion " ). exists()) {
553
- project. delete(files(" $project . rootDir /$bwcFilePath /job-scheduler/$bwcVersion " ))
554
- }
555
- project. mkdir bwcJobSchedulerPath + bwcVersion
556
- ant. get(src : bwcOpenSearchJSDownload,
557
- dest : bwcJobSchedulerPath + bwcVersion,
558
- httpusecaches : false )
559
- return fileTree(bwcJobSchedulerPath + bwcVersion). getSingleFile()
560
- }
561
- }
562
- }
563
- }))
564
- plugin(provider(new Callable<RegularFile > (){
565
- @Override
566
- RegularFile call () throws Exception {
567
- return new RegularFile () {
568
- @Override
569
- File getAsFile () {
570
- return configurations. zipArchive. asFileTree. matching {
571
- include ' **/opensearch-sql-plugin*'
572
- }. singleFile
573
- }
574
- }
538
+ plugin(provider { (RegularFile ) (() -> {
539
+ if (new File (" $project . rootDir /$bwcFilePath /job-scheduler/$bwcVersion " ). exists()) {
540
+ project. delete(files(" $project . rootDir /$bwcFilePath /job-scheduler/$bwcVersion " ))
575
541
}
576
- }))
542
+ project. mkdir bwcJobSchedulerPath + bwcVersion
543
+ ant. get(src : bwcOpenSearchJSDownload,
544
+ dest : bwcJobSchedulerPath + bwcVersion,
545
+ httpusecaches : false )
546
+ return fileTree(bwcJobSchedulerPath + bwcVersion). getSingleFile()
547
+ })})
548
+ plugin(provider { (RegularFile ) (() -> {
549
+ return configurations. zipArchive. asFileTree. matching {
550
+ include ' **/opensearch-sql-plugin*'
551
+ }. singleFile
552
+ })})
577
553
setting ' path.repo' , " ${ buildDir} /cluster/shared/repo/${ baseName} "
578
554
setting ' http.content_type.required' , ' true'
579
555
}
@@ -582,17 +558,9 @@ task comparisonTest(type: RestIntegTestTask) {
582
558
583
559
List<Provider<RegularFile > > plugins = [
584
560
getJobSchedulerPlugin(),
585
- provider(new Callable<RegularFile > () {
586
- @Override
587
- RegularFile call () throws Exception {
588
- return new RegularFile () {
589
- @Override
590
- File getAsFile () {
591
- return fileTree(bwcFilePath + project. version). getSingleFile()
592
- }
593
- }
594
- }
595
- })
561
+ provider { (RegularFile ) (() ->
562
+ fileTree(bwcFilePath + project. version). getSingleFile())
563
+ }
596
564
]
597
565
598
566
// Creates 2 test clusters with 3 nodes of the old version.
0 commit comments