-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
Migrate MinAggregator integration tests to AggregatorTestCase #50053
Conversation
- Also renames MinTests to MinAggregationBuilderTests
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
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. There's some other cases we could test, like an incorrect type field or weird missing values, but I don't know that we need to do that right now. Long term, it'd be good to come up with a "standard battery" of tests we should apply to all aggs, but this is a great step towards standardized tests!
server/src/test/java/org/elasticsearch/search/aggregations/metrics/MinAggregatorTests.java
Show resolved
Hide resolved
Added a few more tests for missing, unmapped fields, bad types, bad missing, etc. Happy to add more if you have particular scenarios not covered. :) |
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.
These tests look great. I can't think of any other cases we urgently need to cover, so let's merge it.
Also renames MinTests to MinAggregationBuilderTests
…c#50053) Also renames MinTests to MinAggregationBuilderTests
Part of #42893, this migrates the min aggregator integration tests over to unit tests in AggregatorTestCase.
While I was messing around with the unit tests, I refactored some of the existing unit tests to use the standardized
searchAndReduce
rather than bespoke version that was in place before.