[TEST] adjusted EsTestCase#randomPositiveLong

This commit is contained in:
javanna 2016-09-01 21:07:53 +02:00 committed by Luca Cavanna
parent 746632fcf9
commit 7c03f65c36

View File

@ -303,11 +303,11 @@ public abstract class ESTestCase extends LuceneTestCase {
}
public static long randomPositiveLong() {
long positiveLong = randomLong();
while (positiveLong == Long.MIN_VALUE) {
positiveLong = randomLong();
}
return Math.abs(positiveLong);
long randomLong;
do {
randomLong = randomLong();
} while (randomLong == Long.MIN_VALUE);
return Math.abs(randomLong);
}
public static float randomFloat() {