Skip to content

Conversation

@cbuescher
Copy link
Member

Relates to #22278

@cbuescher cbuescher added review >test Issues or PRs that are addressing/adding tests v6.0.0-alpha1 labels Feb 20, 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.

LGTM, just one minor comment about random parameter generation.

protected InternalChildren createTestInstance(String name, List<PipelineAggregator> pipelineAggregators,
Map<String, Object> metaData) {
// we shouldn't use the full long range here since we sum doc count on reduce, and don't want to overflow the long range there
long docCount = Math.abs(randomInt());
Copy link
Contributor

Choose a reason for hiding this comment

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

if randomInt() returns -2^31 then docCount will be negative (since the absolute value cannot be represented as an int in that case)

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, will change that to a positive int then.

@cbuescher
Copy link
Member Author

Merging this, CI seems stuck but local tests passed.

@cbuescher cbuescher merged commit ea9d511 into elastic:master Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>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