Skip to content

Commit 8d00f2b

Browse files
committed
Fix disk no space issue in bwc-test
Signed-off-by: Lantao Jin <ltjin@amazon.com>
1 parent 234f608 commit 8d00f2b

1 file changed

Lines changed: 32 additions & 37 deletions

File tree

integ-test/build.gradle

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -592,53 +592,48 @@ task comparisonTest(type: RestIntegTestTask) {
592592
systemProperty "queries", System.getProperty("queries")
593593
}
594594

595-
2.times { i ->
596-
testClusters {
597-
"${baseName}$i" {
598-
testDistribution = "ARCHIVE"
599-
versions = [baseVersion, opensearch_version]
600-
numberOfNodes = 3
601-
plugin(provider { (RegularFile) (() -> {
602-
if (new File("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion").exists()) {
603-
project.delete(files("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion"))
604-
}
605-
project.mkdir bwcJobSchedulerPath + bwcVersion
606-
ant.get(src: bwcOpenSearchJSDownload,
607-
dest: bwcJobSchedulerPath + bwcVersion,
608-
httpusecaches: false)
609-
return fileTree(bwcJobSchedulerPath + bwcVersion).getSingleFile()
610-
})})
611-
plugin(provider { (RegularFile) (() -> {
612-
return configurations.zipArchive.asFileTree.matching {
613-
include '**/opensearch-sql-plugin*'
614-
}.singleFile
615-
})})
616-
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
617-
setting 'http.content_type.required', 'true'
618-
}
595+
testClusters {
596+
"${baseName}" {
597+
testDistribution = "ARCHIVE"
598+
versions = [baseVersion, opensearch_version]
599+
numberOfNodes = 3
600+
plugin(provider { (RegularFile) (() -> {
601+
if (new File("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion").exists()) {
602+
project.delete(files("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion"))
603+
}
604+
project.mkdir bwcJobSchedulerPath + bwcVersion
605+
ant.get(src: bwcOpenSearchJSDownload,
606+
dest: bwcJobSchedulerPath + bwcVersion,
607+
httpusecaches: false)
608+
return fileTree(bwcJobSchedulerPath + bwcVersion).getSingleFile()
609+
})})
610+
plugin(provider { (RegularFile) (() -> {
611+
return configurations.zipArchive.asFileTree.matching {
612+
include '**/opensearch-sql-plugin*'
613+
}.singleFile
614+
})})
615+
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
616+
setting 'http.content_type.required', 'true'
619617
}
620618
}
621-
622619
List<Provider<RegularFile>> plugins = [
623620
getJobSchedulerPlugin(),
624621
provider { (RegularFile) (() ->
625622
fileTree(bwcFilePath + project.version).getSingleFile())
626623
}
627624
]
628625

629-
// Creates 2 test clusters with 3 nodes of the old version.
630-
2.times { i ->
631-
task "${baseName}#oldVersionClusterTask$i"(type: StandaloneRestIntegTestTask) {
632-
useCluster testClusters."${baseName}$i"
633-
filter {
634-
includeTestsMatching "org.opensearch.sql.bwc.*IT"
635-
}
636-
systemProperty 'tests.rest.bwcsuite', 'old_cluster'
637-
systemProperty 'tests.rest.bwcsuite_round', 'old'
638-
systemProperty 'tests.plugin_bwc_version', bwcVersion
639-
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}$i".allHttpSocketURI.join(",")}")
640-
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}$i".getName()}")
626+
// Creates test cluster with 3 nodes of the old version.
627+
task "${baseName}#oldVersionClusterTask"(type: StandaloneRestIntegTestTask) {
628+
useCluster testClusters."${baseName}"
629+
filter {
630+
includeTestsMatching "org.opensearch.sql.bwc.*IT"
641631
}
632+
systemProperty 'tests.rest.bwcsuite', 'old_cluster'
633+
systemProperty 'tests.rest.bwcsuite_round', 'old'
634+
systemProperty 'tests.plugin_bwc_version', bwcVersion
635+
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
636+
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
642637
}
643638

644639
// Upgrade one node of the old cluster to new OpenSearch version with upgraded plugin version.

0 commit comments

Comments
 (0)