mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
Fix ExponentialBucketHistogramTests (#127700)
This commit is contained in:
parent
f1f745966f
commit
4e4d59cc17
1 changed files with 3 additions and 1 deletions
|
@ -73,7 +73,9 @@ public class ExponentialBucketHistogramTests extends ESTestCase {
|
||||||
expectedCounts[bucket] += 1;
|
expectedCounts[bucket] += 1;
|
||||||
|
|
||||||
final int lowerBound = bucket == 0 ? 0 : upperBounds[bucket - 1];
|
final int lowerBound = bucket == 0 ? 0 : upperBounds[bucket - 1];
|
||||||
final int upperBound = bucket == upperBounds.length ? randomBoolean() ? 100000 : Integer.MAX_VALUE : upperBounds[bucket] - 1;
|
final int upperBound = bucket == upperBounds.length
|
||||||
|
? randomBoolean() ? upperBounds[bucket - 1] * 2 : Integer.MAX_VALUE
|
||||||
|
: upperBounds[bucket] - 1;
|
||||||
histogram.addObservation(between(lowerBound, upperBound));
|
histogram.addObservation(between(lowerBound, upperBound));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue