Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,10 @@ public void testMismatch() throws IOException {
InternalAggregation.ReduceContext reduceContext = new InternalAggregation.ReduceContext(bigArrays, scriptService, true);
Exception e = expectThrows(RuntimeException.class,
Copy link
Member

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.

Copy link
Contributor Author

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.

() -> RollupResponseTranslator.combineResponses(msearch, reduceContext));
assertThat(e.getMessage(), equalTo("org.elasticsearch.search.aggregations.metrics.geobounds.InternalGeoBounds " +
"cannot be cast to org.elasticsearch.search.aggregations.InternalMultiBucketAggregation"));
assertThat(e.getMessage(),
containsString("org.elasticsearch.search.aggregations.metrics.geobounds.InternalGeoBounds"));
assertThat(e.getMessage(),
containsString("org.elasticsearch.search.aggregations.InternalMultiBucketAggregation"));
}

public void testDateHisto() throws IOException {
Expand Down