Add base class for writing unit test for aggregations#22279
Add base class for writing unit test for aggregations#22279martijnvg merged 1 commit intoelastic:masterfrom
Conversation
jpountz
left a comment
There was a problem hiding this comment.
I left some comments, but +1 to start from there.
There was a problem hiding this comment.
I don't think the generics on this method are buying anything since we do a blind cast here?
There was a problem hiding this comment.
The reason I did the cast here is that we don't have to do the cast in all tests that need an aggregator.
There was a problem hiding this comment.
can you also test what happens when no docs match the query?
There was a problem hiding this comment.
or when some docs match the query but do not have a value
There was a problem hiding this comment.
can you call it aggregationBuilder rather than aggregatorBuilder to be more consistent with the class name?
jpountz
left a comment
There was a problem hiding this comment.
This looks like a good start! Thanks for working on that!
7b847a0 to
0346583
Compare
…terms`, `top_hits` and `min` aggregations.
0346583 to
417746c
Compare
Also adds some initial tests for some aggregations.
First PR for #22278.