-
Notifications
You must be signed in to change notification settings - Fork 138
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
Expose execute api for MLClient #1540
Conversation
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
|
||
verify(client).execute(eq(MLExecuteTaskAction.INSTANCE), isA(MLExecuteTaskRequest.class), any()); | ||
verify(executeTaskResponseActionListener).onResponse(argumentCaptor.capture()); | ||
assertEquals(FunctionName.METRICS_CORRELATION, argumentCaptor.getValue().getFunctionName()); |
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.
can we assert the output too?
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.
I added this additional assert cause you can never have too many tests but test coverage of this file is already at 100% methods and 100% lines:)
Asserting anything specific related to metrics correlation algorithm should be covered when testing the algorithm unit itself, like in this file - https://github.com/opensearch-project/ml-commons/blob/main/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/metrics_correlation/MetricsCorrelationTest.java
Codecov Report
@@ Coverage Diff @@
## main #1540 +/- ##
============================================
+ Coverage 78.40% 78.41% +0.01%
- Complexity 2378 2380 +2
============================================
Files 195 195
Lines 9588 9594 +6
Branches 964 964
============================================
+ Hits 7517 7523 +6
Misses 1633 1633
Partials 438 438
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
* Expose execute api for MLClient Signed-off-by: Jackie Han <jkhanjob@gmail.com> * unit test change Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com> (cherry picked from commit 5d9324c)
* Expose execute api for MLClient Signed-off-by: Jackie Han <jkhanjob@gmail.com> * unit test change Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com> (cherry picked from commit 5d9324c) Co-authored-by: Jackie Han <jkhanjob@gmail.com>
* Expose execute api for MLClient Signed-off-by: Jackie Han <jkhanjob@gmail.com> * unit test change Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com> Signed-off-by: TrungBui59 <bui23@purdue.edu>
* Expose execute api for MLClient Signed-off-by: Jackie Han <jkhanjob@gmail.com> * unit test change Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com> Signed-off-by: TrungBui59 <bui23@purdue.edu>
* Expose execute api for MLClient Signed-off-by: Jackie Han <jkhanjob@gmail.com> * unit test change Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Description
Expose execute api for MLClient
Issues Resolved
[List any issues this PR will resolve]
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.