Tests: Fix failure in InternalGeoBoundsTests (#26112)

This occasionally fails now because if `top` is `-Infinity` (which we sometimes 
test for in randomization), the value might not get changed for the
equals/hashCode tests.

Closes #26107
This commit is contained in:
Christoph Büscher 2017-08-09 23:01:36 +02:00 committed by GitHub
parent dfbaf90951
commit 566992d2a1
1 changed files with 5 additions and 1 deletions

View File

@ -121,7 +121,11 @@ public class InternalGeoBoundsTests extends InternalAggregationTestCase<Internal
name += randomAlphaOfLength(5);
break;
case 1:
if (Double.isFinite(top)) {
top += between(1, 20);
} else {
top = randomDouble();
}
break;
case 2:
bottom += between(1, 20);