Skip to content

Commit

Permalink
Update bwc wrapper
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Kwok <[email protected]>
  • Loading branch information
andy-k-improving committed Jan 29, 2025
1 parent 6ba4c0e commit 194a986
Showing 1 changed file with 17 additions and 31 deletions.
48 changes: 17 additions & 31 deletions integ-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -536,37 +536,21 @@ task comparisonTest(type: RestIntegTestTask) {
testDistribution = "ARCHIVE"
versions = [baseVersion, opensearch_version]
numberOfNodes = 3
plugin(provider(new Callable<RegularFile>(){
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
if (new File("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion").exists()) {
project.delete(files("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion"))
}
project.mkdir bwcJobSchedulerPath + bwcVersion
ant.get(src: bwcOpenSearchJSDownload,
dest: bwcJobSchedulerPath + bwcVersion,
httpusecaches: false)
return fileTree(bwcJobSchedulerPath + bwcVersion).getSingleFile()
}
}
plugin(provider { (RegularFile) (() -> {
if (new File("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion").exists()) {
project.delete(files("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion"))
}
}))
plugin(provider(new Callable<RegularFile>(){
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return configurations.zipArchive.asFileTree.matching {
include '**/opensearch-sql-plugin*'
}.singleFile
}
}
}
}))
project.mkdir bwcJobSchedulerPath + bwcVersion
ant.get(src: bwcOpenSearchJSDownload,
dest: bwcJobSchedulerPath + bwcVersion,
httpusecaches: false)
return fileTree(bwcJobSchedulerPath + bwcVersion).getSingleFile()
})})
plugin(provider { (RegularFile) (() -> {
return configurations.zipArchive.asFileTree.matching {
include '**/opensearch-sql-plugin*'
}.singleFile
})})
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
setting 'http.content_type.required', 'true'
}
Expand All @@ -576,10 +560,12 @@ task comparisonTest(type: RestIntegTestTask) {
List<Provider<RegularFile>> plugins = [
getJobSchedulerPlugin(),
provider { (RegularFile) (() ->
fileTree(bwcFilePath + project.version).getSingleFile() )
fileTree(bwcFilePath + project.version).getSingleFile())
}
]



// Creates 2 test clusters with 3 nodes of the old version.
2.times { i ->
task "${baseName}#oldVersionClusterTask$i"(type: StandaloneRestIntegTestTask) {
Expand Down

0 comments on commit 194a986

Please sign in to comment.