Skip to content
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

Add unit tests for the missing aggregator #23895

Merged
merged 2 commits into from
Apr 4, 2017
Merged

Add unit tests for the missing aggregator #23895

merged 2 commits into from
Apr 4, 2017

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Apr 4, 2017

Relates #22278

@jimczi jimczi added :Analytics/Aggregations Aggregations review >test Issues or PRs that are addressing/adding tests v6.0.0-alpha1 labels Apr 4, 2017
Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some suggestions.

new InternalAggregation.ReduceContext(root.context().bigArrays(), null, false));
aggs.removeAll(internalAggregations);
aggs.add(internalAgg);
aggs = aggs.subList(r, toReduceSize);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe do new ArrayList<>(aggs.subList(r, toReduceSize)); since you call add again below?

assertEquals(internalMissing.getDocCount(), count.get());
count.set(0);
});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also test the case that the field does not exist?

Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jimczi jimczi merged commit c14be20 into elastic:master Apr 4, 2017
@jimczi jimczi deleted the missing_agg_tests branch April 4, 2017 12:37
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Apr 4, 2017
* master:
  Fix Javadocs for BootstrapChecks#enforceLimits
  Disable bootstrap checks for single-node discovery
  Add unit tests for the missing aggregator (elastic#23895)
  Add a property to mark setting as final (elastic#23872)
  testDifferentRolesMaintainPathOnRestart - fix broken comment
  testDifferentRolesMaintainPathOnRestart - lower join timeout as split elections are likely
  Introduce single-node discovery
  Await termination after shutting down executors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >test Issues or PRs that are addressing/adding tests v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants