Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chu <[email protected]>
  • Loading branch information
noCharger committed Sep 6, 2024
1 parent d206a07 commit d621140
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions integ-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ compileTestJava {
}
}

testClusters.all {
// debug with command, ./gradlew opensearch-sql:run -DdebugJVM. --debug-jvm does not work with keystore.
if (System.getProperty("debugJVM") != null) {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005'
}
}

def getJobSchedulerPlugin() {
provider(new Callable<RegularFile>() {
@Override
Expand All @@ -220,13 +227,6 @@ def getJobSchedulerPlugin() {
})
}

testClusters.all {
// debug with command, ./gradlew opensearch-sql:run -DdebugJVM. --debug-jvm does not work with keystore.
if (System.getProperty("debugJVM") != null) {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005'
}
}

testClusters {
integTest {
testDistribution = 'archive'
Expand Down Expand Up @@ -554,20 +554,19 @@ String bwcRemoteFileJSPlugin = bwcRemoteFileRoot + bwcJSPlugin
}
} else {
versions = ["1.1.0", opensearch_version]
plugin(provider(new Callable<RegularFile>() {
plugin(provider(new Callable<RegularFile>(){
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
File dir = new File('./integ-test/' + bwcJSPluginPath + bwcVersion)
if (!dir.exists()) {
dir.mkdirs()
}
File f = new File(dir, bwcJSPlugin)
if (!f.exists()) {
new URL(bwcRemoteFileJSPlugin).withInputStream{ ins -> f.withOutputStream{ it << ins }}
if (new File("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion").exists()) {
project.delete(files("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion"))
}
project.mkdir bwcJSPluginPath + bwcVersion
ant.get(src: bwcRemoteFileJSPlugin,
dest: bwcJSPluginPath + bwcVersion,
httpusecaches: false)
return fileTree(bwcJSPluginPath + bwcVersion).getSingleFile()
}
}
Expand Down Expand Up @@ -600,13 +599,13 @@ String bwcRemoteFileJSPlugin = bwcRemoteFileRoot + bwcJSPlugin
}

List<Provider<RegularFile>> plugins = [
provider(new Callable<RegularFile>() {
provider(new Callable<RegularFile>(){
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return fileTree(bwcJSPluginPath + project.version).getSingleFile()
return configurations.zipArchive.asFileTree.getSingleFile()
}
}
}
Expand Down

0 comments on commit d621140

Please sign in to comment.