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 intermittent failed TestMaxClauseLimitations tests, #1050 #1054

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

paulirwin
Copy link
Contributor

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a change, please open an issue to discuss the change or find an existing issue.

Fix intermittent failed TestMaxClauseLimitations tests

Fixes #1050

Description

These tests occasionally fail on .NET 8 due to Dynamic PGO optimizing the code and inlining some methods, which changes the stack trace. Instead of harming performance by forcing NoInlining, since this case inspecting the stack trace was only for an assertion rather than changing behavior (as other cases of inspecting the stack trace for specific methods do), this assertion was removed. It should only matter here if the exception is thrown; not which specific method throws it. The Assert.Fail above this catch explains exactly that, and the original comment was even questioning whether it should be removed.

@paulirwin paulirwin added the notes:bug-fix Contains a fix for a bug label Dec 2, 2024
@paulirwin paulirwin merged commit d1386d5 into apache:master Dec 3, 2024
6 checks passed
@paulirwin paulirwin deleted the issue/1050 branch December 3, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes:bug-fix Contains a fix for a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent Failing Test: Lucene.Net.Search.TestMultiTermQueryRewrites.TestMaxClauseLimitations()
2 participants