forked from opensearch-project/anomaly-detection
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update BWC Test Version and Enhance Code Coverage
This PR updates the BWC test version to 2.16 in the build.gradle file and includes additional integration and unit tests to improve code coverage. Testing Performed: * Executed gradle build to ensure successful build and integration. Signed-off-by: Kaituo Li <[email protected]>
- Loading branch information
Showing
25 changed files
with
1,568 additions
and
480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
apply plugin: 'jacoco' | ||
|
||
jacoco { | ||
toolVersion = "0.8.10" | ||
} | ||
|
||
/** | ||
* This code sets up coverage reporting manually for the k-NN plugin tests. This is complicated because: | ||
* 1. The OS integTest Task doesn't implement Gradle's JavaForkOptions so we have to manually start the jacoco agent with the test JVM | ||
* 2. The cluster nodes are stopped using 'kill -9' which means jacoco can't dump it's execution output to a file on VM shutdown | ||
* 3. The Java Security Manager prevents JMX from writing execution output to the file. | ||
* | ||
* To workaround these we start the cluster with jmx enabled and then use Jacoco's JMX MBean to get the execution data before the | ||
* cluster is stopped and dump it to a file. Luckily our current security policy seems to allow this. This will also probably | ||
* break if there are multiple nodes in the integTestCluster. But for now... it sorta works. | ||
*/ | ||
integTest { | ||
jacoco { | ||
jmx = true | ||
} | ||
|
||
systemProperty 'jacoco.dir', project.layout.buildDirectory.get().file("jacoco").asFile.absolutePath | ||
systemProperty 'jmx.serviceUrl', "service:jmx:rmi:///jndi/rmi://127.0.0.1:7777/jmxrmi" | ||
} | ||
|
||
jacocoTestReport { | ||
dependsOn integTest, test | ||
executionData.from = [integTest.jacoco.destinationFile, test.jacoco.destinationFile] | ||
reports { | ||
html.getRequired().set(true) // human readable | ||
csv.getRequired().set(true) | ||
xml.getRequired().set(true) // for coverlay | ||
} | ||
} | ||
|
||
testClusters.integTest { | ||
jvmArgs " ${integTest.jacoco.getAsJvmArg()}" | ||
|
||
systemProperty 'com.sun.management.jmxremote', "true" | ||
systemProperty 'com.sun.management.jmxremote.authenticate', "false" | ||
systemProperty 'com.sun.management.jmxremote.port', "7777" | ||
systemProperty 'com.sun.management.jmxremote.ssl', "false" | ||
systemProperty 'java.rmi.server.hostname', "127.0.0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
src/main/java/org/opensearch/timeseries/util/TaskUtil.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.