-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
[TEST] Fix failure due to exception message in java11 #32321
[TEST] Fix failure due to exception message in java11 #32321
Conversation
Java 11 uses more verbose exceptions messages, causing this assertion to fail. Changed the test to be less restrictive and only look for the classes we care about.
Pinging @elastic/es-search-aggs |
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, I left a small request.
@@ -510,8 +510,10 @@ public void testMismatch() throws IOException { | |||
InternalAggregation.ReduceContext reduceContext = new InternalAggregation.ReduceContext(bigArrays, scriptService, true); | |||
Exception e = expectThrows(RuntimeException.class, |
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.
Can this be more specific so that we at least check the expected exception type? By checking the exception message I think we at least used to expect a ClassCastException or something alike. Would be great if we can to that here now that the assertion on the exact message text needs to be relaxed a bit.
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.
Oops, good catch. Should have been like that before anyway.
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.
LGTM
* master: [DOCS] Fix formatting error in Slack action Painless: Fix documentation links to use existing refs (#32335) Painless: Decouple PainlessLookupBuilder and Whitelists (#32346) [DOCS] Adds recommendation for xpack.security.enabled (#32345) [TEST] Mute ConvertProcessortTests.testConvertIntHexError [TEST] Fix failure due to exception message in java11 (#32321) [DOCS] Fixes typo in ML aggregations page [DOCS] Adds link from bucket_span property to common time units [ML][DOCS] Add documentation for detector rules and filters (#32013) Add opaque_id to index audit logging (#32260) Add 6.5.0 version to master fixes broken build for third-party-tests (#32353)
Java 11 uses more verbose exceptions messages, causing this assertion to fail. Changed the test to be less restrictive and only look for the classes we care about.
@cbuescher looks like CI turned up another variation of #32036, this time in rollup tests :)
Changed the test to be less restrictive and only look for the classes we care about, so that we don't fail on java 11 with more verbose exception messages.