Refactor TopGroups.merge tests [LUCENE-9042]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
This task proposes a refactoring of the test coverage for the `TopGroups.merge` method implemented in #10053. For now it will cover only 3 main cases.
1. Merging to empty TopGroups
2. Merging a TopGroups with scores and a TopGroups without scores (currently broken because of #10039 bug)
3. Merging two TopGroups with scores.
I'm planning to increase the coverage testing also invalid inputs but I would do that in a separate PR to keep the code readable.
---
Migrated from [LUCENE-9042](https://issues.apache.org/jira/browse/LUCENE-9042) by Diego Ceccarelli, updated Feb 15 2020
Attachments: [LUCENE-9042.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-9042/LUCENE-9042.patch)
Linked issues:
- #10039
- #10053
Contributor guide
Research direction
Start at the TopGroups.merge entry point and review the test coverage added by #10053. Add coverage for merging empty groups, groups with and without scores, and two groups with scores; the tests should expose the existing #10039 behavior without mixing in invalid-input cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100