Handle core's cleanup of terms aggregation

Original commit: elastic/x-pack-elasticsearch@c764d11867
This commit is contained in:
Nik Everett 2016-07-07 17:06:07 -04:00
parent fcaeea2988
commit 87e84bf9e1
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ public class MultiNodesStatsTests extends MonitoringIntegTestCase {
assertThat(((StringTerms) aggregation).getBuckets().size(), equalTo(nbNodes)); assertThat(((StringTerms) aggregation).getBuckets().size(), equalTo(nbNodes));
for (String nodeName : internalCluster().getNodeNames()) { for (String nodeName : internalCluster().getNodeNames()) {
StringTerms.Bucket bucket = (StringTerms.Bucket) ((StringTerms) aggregation) StringTerms.Bucket bucket = ((StringTerms) aggregation)
.getBucketByKey(internalCluster().clusterService(nodeName).localNode().getId()); .getBucketByKey(internalCluster().clusterService(nodeName).localNode().getId());
// At least 1 doc must exist per node, but it can be more than 1 // At least 1 doc must exist per node, but it can be more than 1
// because the first node may have already collected many node stats documents // because the first node may have already collected many node stats documents