[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() { public static long randomPositiveLong() {
long positiveLong = randomLong(); long randomLong;
while (positiveLong == Long.MIN_VALUE) { do {
positiveLong = randomLong(); randomLong = randomLong();
} } while (randomLong == Long.MIN_VALUE);
return Math.abs(positiveLong); return Math.abs(randomLong);
} }
public static float randomFloat() { public static float randomFloat() {