Refactor metric PipelineAggregation integration test#77548
Refactor metric PipelineAggregation integration test#77548iverase merged 2 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-analytics-geo (Team:Analytics) |
| // so that there is an UnmappedTerms in the list to reduce. | ||
| createIndex("foo_1"); | ||
|
|
||
| XContentBuilder builder = jsonBuilder().startObject() |
There was a problem hiding this comment.
Could fix this one's format while you are here? It looks like the kind of thing someone hand indented and then the auto-formatter zapped.
There was a problem hiding this comment.
umm, yes this is how spotless has formatted this code. What do you mean to fix the formatting? Once we are using spotless, I think it has the last word on 'correct' formatting :)
There was a problem hiding this comment.
You can disable spotless for blocks or whole files via directives in the comments: // @formatter:off and // @formatter:on. We shouldn't overuse it, but formatting XContentBuilder is a good place for it.
There was a problem hiding this comment.
Thanks @not-napoleon, I formatted this bit of code.
There was a problem hiding this comment.
I was thinking of splitting it into multiple lines or something. I dunno about spotless being the last word on formatting - if the code is hard to read we should do something.
|
ping @not-napoleon @nik9000 what needs to be done here? |
nik9000
left a comment
There was a problem hiding this comment.
I think it's good. Sorry, I hadn't noticed the changes.
not-napoleon
left a comment
There was a problem hiding this comment.
I'm also good with this if Nik is.
💔 Backport failed
You can use sqren/backport to manually backport by running |
This commit extracts BucketMetricsPipeLineAggregationTestCase and simplifies the testing of several pipeline aggregations.
* master: (185 commits) Implement get and containsKey in terms of the wrapped innerMap (elastic#77965) Adjust Lucene version and enable BWC tests (elastic#77933) Disable BWC to upgrade to Lucene-8.10-snapshot Reenable MlDistributedFailureIT [DOCS] Fix typo for `script.painless.regex.enabled` setting value (elastic#77853) Upgrade to Lucene-8.10.0-snapshot-bf2fcb53079 (elastic#77801) [DOCS] Fix ESS install lead-in (elastic#77887) Resolve thirdparty gradle plugin artifacts from mavencentral (elastic#77865) Reduce the number of times that `LifecycleExecutionState` is parsed when running a policy. (elastic#77863) Utility methods to add and remove backing indices from data streams (elastic#77778) Use Objects.equals() instead of == to compare strings (elastic#77840) [ML] prefer least allocated model when a new node is added to the cluster (elastic#77756) Deprecate ignore_throttled parameter (elastic#77479) Improve LifecycleExecutionState parsing. (elastic#77855) [DOCS] Removes deprecated word from HLRC title. (elastic#77851) Remove legacy geo code from AggregationResultUtils (elastic#77702) Adjust SearchableSnapshotsBlobStoreCacheIntegTests.testBlobStoreCache (elastic#77758) Laxify SecureSM to allow creation of the JDK's innocuous threads (elastic#77789) [Test] Reduce concurrency when testing creation of security index (elastic#75293) Refactor metric PipelineAggregation integration test (elastic#77548) ... # Conflicts: # server/src/main/java/org/elasticsearch/cluster/metadata/DataStream.java
Follow up #77481, there are several pipeline aggregation integration test that seems to have been cloned and can easily be refactor in a test case.
This PR extract
BucketMetricsPipeLineAggregationTestCaseand simplifies the testing of several pipeline aggregations.