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

Fix Flaky Test In TestBlockJoinBulkScorer #13785

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

Mikep86
Copy link
Contributor

@Mikep86 Mikep86 commented Sep 13, 2024

Fix the testSetMinCompetitiveScoreWithScoreModeMax test, which sometimes failed due to randomizations in how the docs were scored. This fix should also be backported to branch_9x.

@Mikep86 Mikep86 marked this pull request as ready for review September 13, 2024 15:53
assertEquals(expectedScoresList.getFirst(), actualScores);
} else {
assertEqualsToOneOf(expectedScoresList, actualScores);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why you don't call assertEqualsToOneOf all the time, shouldn't it also work in the size==1 case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should and I originally did that, but if you use assertEquals there are nicer IDE integrations for value comparison on failure. Given that this method is called with a single map of expected scores in nearly all cases, I tried to preserve that functionality. This could help in the case of a failure in testScoreRandomIndices, which could have a large random score map.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@jpountz jpountz merged commit e7a6382 into apache:main Sep 16, 2024
3 checks passed
@jpountz jpountz modified the milestone: 9.12.0 Sep 16, 2024
@javanna
Copy link
Contributor

javanna commented Sep 16, 2024

Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants