-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add assertWarnings capabilities to base token stream test case #113619
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
Add assertWarnings capabilities to base token stream test case #113619
Conversation
Pinging @elastic/es-search (Team:Search) |
@elasticmachine update branch |
…github.com:benwtrent/elasticsearch into refactor/add-assert-warnings-to-token-stream-tests
I agree we should be able to assert warnings in tests extending ESTokenStreamTestCase. I ran into this in #113614 as well. However I see disadvantages in copying the warnings-related code from ESTestCase here, because it is basically code duplication. The solution I suggested in #113614 is changing ESTokenStreamTestCase to extend ESTestCase instead of BaseTokenStreamTestCase. By that we get all the test infrastructure we are used to from other tests. BaseTokenStreamTestCase doesn't give us anything other than static helper methods that can be imported in a one-liner if needed. I would argue that's better than carrying two copies of the warning header test infra around. |
Eh, code duplication ain't that big of a deal, but let me see the impact of doing a switch (in isolation) as you suggest. Maybe its just as simple. |
@cbuescher did it your way, not a huge change actually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making that change, LGTM.
@elasticmachine update branch |
@elasticmachine update branch |
💚 Backport successful
|
…ic#113619) We need to be able to assert various warnings and check for such in typical token stream tests. This adds that capability.
…113619) (#113688) * Add assertWarnings capabilities to base token stream test case (#113619) We need to be able to assert various warnings and check for such in typical token stream tests. This adds that capability. * fixing test --------- Co-authored-by: Elastic Machine <[email protected]>
…ic#113619) We need to be able to assert various warnings and check for such in typical token stream tests. This adds that capability.
We need to be able to assert various warnings and check for such in typical token stream tests. This adds that capability.