apache / apache/lucene

Improve TestTaxonomyFacetAssociations#validateFloats to not rely on summation ordering

Open
#13,738 3 comments 0 reactions 0 assignees View on GitHub
type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

### Description

After merging #13726 we saw test failures because `TestTaxonomyFacetAssociations#validateFloats` is written to (intentionally) sum floats in a consistent order and then use exact equality, but the test update brought in search concurrency which breaks that consistency. This got fixed with 0ec453d485df5411d21edd24b47f4880befd30d0, which just disables the concurrency in these tests for now, but maybe we should make this test less fragile and bring the concurrency back? Could be a nice opportunity to leverage #13723 when it gets merged.

Contributor guide

Open the contributing guide

Research direction

Start by reading TestTaxonomyFacetAssociations#validateFloats and commit 0ec453d485df5411d21edd24b47f4880befd30d0 to understand the concurrency workaround. Review issue #13723 for the proposed approach, then restore concurrent searching while making the float validation independent of summation order. Done means the tests remain stable with concurrency enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search, testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.