Skip to content

Commit 333e5cf

Browse files
committed
Fix test bounds
Fix a test mistake that I just committed in #68592. I a bad set of bounds on the randomized values used by the "short" set of tests. Mostly because I fogot that `^` isn't the exponentiation operator.....
1 parent f2d6c25 commit 333e5cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/LongKeyedBucketOrdsTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ public void testCollectsFromManyBuckets() {
100100
}
101101

102102
public void testCollectsFromManyBucketsSmall() {
103-
int owningBucketOrds = scaledRandomIntBetween(1, 10000);
104-
long maxValue = randomLongBetween(10000 / owningBucketOrds, 2^(16 * 3));
103+
int owningBucketOrds = scaledRandomIntBetween(2, 10000);
104+
long maxValue = randomLongBetween(10000 / owningBucketOrds, 2 << (16 * 3));
105105
CardinalityUpperBound cardinality = CardinalityUpperBound.ONE.multiply(owningBucketOrds);
106106
try (LongKeyedBucketOrds ords = LongKeyedBucketOrds.buildForValueRange(bigArrays, cardinality, 0, maxValue)) {
107107
assertCollectsFromManyBuckets(ords, owningBucketOrds, 0, maxValue);

0 commit comments

Comments
 (0)