-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Migrate tests from MaxIT to MaxAggregatorTests #45030
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
Conversation
Pinging @elastic/es-analytics-geo |
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.
The move of the tests look good to me but I left one comment regarding the remaining integration test.
|
||
public class MaxIT extends AbstractNumericTestCase { | ||
public class MaxIT extends ESIntegTestCase { | ||
|
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.
I think it's ok to remove this test entirely. testDontCacheScripts
is tested on a lot of aggregations (metrics, top_hits, terms, ...) but we don't really need an integration test for this. For instance AbstractQueryTestCase#testToQuery
checks QueryShardContext#isCacheable
after building the query, we could have the same kind of unit test in MaxAggregatorTests
. Does this makes sense ?
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.
++ Christos and I chatted about this last week and agreed it's doable in the framework. I'll make the change and merge (Christos was on support ramp and wasn't able to get to it before PTO). Thanks!
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.
Removed integration test MaxIT
and implemented caching checks in MaxAggregatorTests#testCacheAggregation
(without script -> cached) and MaxAggregatorTests#testDontCacheScripts
(with script -> not cached)
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 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.
Also LGTM! :)
This PR migrates tests from MaxIT integration test to MaxAggregatorTests, as described in elastic#42893
… tests (elastic#45737) Similar to PR elastic#45030 integration test testDontCacheScripts() was moved to unit test AvgAggregatorTests#testDontCacheScripts. AvgIT class was removed.
This PR migrates tests from MaxIT integration test to MaxAggregatorTests, as described in #42893