-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduced jacoco exclusions and added more tests #446
Reduced jacoco exclusions and added more tests #446
Conversation
Codecov Report
@@ Coverage Diff @@
## main #446 +/- ##
============================================
+ Coverage 78.11% 78.32% +0.20%
- Complexity 4141 4170 +29
============================================
Files 296 296
Lines 17657 17657
Branches 1879 1879
============================================
+ Hits 13792 13829 +37
+ Misses 2971 2948 -23
+ Partials 894 880 -14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for adding more tests!
Signed-off-by: Amit Galitzky <[email protected]>
Signed-off-by: Amit Galitzky <[email protected]>
Signed-off-by: Amit Galitzky <[email protected]>
52cf999
to
455a07c
Compare
@@ -479,15 +479,16 @@ List<String> jacocoExclusions = [ | |||
// code for configuration, settings, etc is excluded from coverage | |||
'org.opensearch.ad.AnomalyDetectorPlugin', | |||
|
|||
// rest layer is tested in integration testing mostly, difficult to mock all of it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to this PR to write unit test for REST actions opensearch-project/ml-commons#228?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will take a look! Will try to add those in a separate PR if thats fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that's fine.
Signed-off-by: Amit Galitzky <[email protected]> (cherry picked from commit 2505add)
Signed-off-by: Amit Galitzky <[email protected]> (cherry picked from commit 2505add)
Signed-off-by: Amit Galitzky [email protected]
Description
This PR adds some tests to various classes that had low coverage as well as removes any unnecessary files from the
jacocoExclusion
list onbuild.gradle
. We had some files there that were either already above the coverage minimum or didn’t exist anymore. Specifically.../model.*
was listed and with additional testing added here and in previous PR (#335) 34 classes were taken off the exclusion list and now only 2 classes from model package are still excluded.I wont close the related issue (#424) yet since more work needs to be done addressing the TODOs, potentially reducing coverage minimums and finishing rest of
model
package testing.Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.