Skip to content
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

[Refactor] Move exact search specific test from KNNWeightTests to ExactSearcherTests #2180

Open
VijayanB opened this issue Oct 3, 2024 · 0 comments
Labels
Refactoring Improve the design, structure, and implementation while preserving its functionality

Comments

@VijayanB
Copy link
Member

VijayanB commented Oct 3, 2024

Currently, we use KNNWeightTests to test exact search methods for unit test. Since Exact Search had one function, it was no needed to have it's own Test class. Now we are adding more features to exact search, hence, it is better mock ExactSearcher in KNNWeightTests and add unit test inside ExactSearcherTest. This will improve readability and visibility of unit test whenever new feature is added.

Example

  1. https://github.com/opensearch-project/k-NN/blob/main/src/test/java/org/opensearch/knn/index/query/KNNWeightTests.java#L679
  2. https://github.com/opensearch-project/k-NN/blob/main/src/test/java/org/opensearch/knn/index/query/KNNWeightTests.java#L684
@VijayanB VijayanB added Refactoring Improve the design, structure, and implementation while preserving its functionality and removed untriaged labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring Improve the design, structure, and implementation while preserving its functionality
Projects
None yet
Development

No branches or pull requests

1 participant