Tests: Fix edge case in InternalBucketMetricValueTests

Same problem as in #26084.
This commit is contained in:
Christoph Büscher 2017-08-07 18:37:51 +02:00
parent 729e09ed6e
commit 0ad4c0529b
1 changed files with 5 additions and 1 deletions

View File

@ -89,7 +89,11 @@ public class InternalBucketMetricValueTests extends InternalAggregationTestCase<
name += randomAlphaOfLength(5);
break;
case 1:
if (Double.isFinite(value)) {
value += between(1, 100);
} else {
value = randomDoubleBetween(0, 100000, true);
}
break;
case 2:
keys = Arrays.copyOf(keys, keys.length + 1);