Fix ExponentialBucketHistogramTests (#127700)

This commit is contained in:
Nick Tindall 2025-05-05 18:41:47 +10:00 committed by GitHub
parent f1f745966f
commit 4e4d59cc17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,7 +73,9 @@ public class ExponentialBucketHistogramTests extends ESTestCase {
expectedCounts[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));
}