Skip to content

Commit ff7ffb6

Browse files
nicktindallywangd
authored andcommitted
Fix ExponentialBucketHistogramTests (elastic#127700)
1 parent ddd5349 commit ff7ffb6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/test/java/org/elasticsearch/common/metrics/ExponentialBucketHistogramTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ public void testHistogramRandom() {
7373
expectedCounts[bucket] += 1;
7474

7575
final int lowerBound = bucket == 0 ? 0 : upperBounds[bucket - 1];
76-
final int upperBound = bucket == upperBounds.length ? randomBoolean() ? 100000 : Integer.MAX_VALUE : upperBounds[bucket] - 1;
76+
final int upperBound = bucket == upperBounds.length
77+
? randomBoolean() ? upperBounds[bucket - 1] * 2 : Integer.MAX_VALUE
78+
: upperBounds[bucket] - 1;
7779
histogram.addObservation(between(lowerBound, upperBound));
7880
}
7981

0 commit comments

Comments
 (0)