MockMaker support, tests for KNNVectorValuesTests, KNNVectorValuesFactoryTests#421
Draft
WojciechKrakowiak wants to merge 2 commits intoopensearch-project:mainfrom
Draft
MockMaker support, tests for KNNVectorValuesTests, KNNVectorValuesFactoryTests#421WojciechKrakowiak wants to merge 2 commits intoopensearch-project:mainfrom
WojciechKrakowiak wants to merge 2 commits intoopensearch-project:mainfrom
Conversation
…toryTests Signed-off-by: Wojciech Krakowiak <wojciech.krakowiak@ibm.com>
Signed-off-by: Wojciech Krakowiak <wojciech.krakowiak@ibm.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part one of tests implementation for #419
KNNVectorValuesTests.java – newest version was compatible
TestVectorValues.java
Compatible version doesn’t include changes from this PR: opensearch-project/k-NN#2587
KNNVectorValuesFactoryTests.java
Migrated state: opensearch-project/k-NN@a4697f4
Mocking final classes requires inline-mock-maker. In solution from KNN, mockito was self-attaching to enable the inline-mock-maker, resulting in deprecation warning. I followed the instructions how to add mockito as an agend to the build, which solves the issue and don’t require additional byte-buddy dependencies. (https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3)
Original KNN solution: https://github.com/opensearch-project/k-NN/pull/759/changes#diff-49a96e7eea8a94af862798a45174e6ac43eb4f8b4bd40759b5da63ba31ec3ef7
Warning from original solution:
Related Issues
Part of #419
Check List
--signoff.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.