blob: ee036156a9f179556bfa55a689916bd0e116f2db [file] [log] [blame]
diff --git a/lucene/test-framework/src/java/org/apache/lucene/geo/GeoTestUtil.java b/lucene/test-framework/src/java/org/apache/lucene/geo/GeoTestUtil.java
index 619b682..c339238 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/geo/GeoTestUtil.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/geo/GeoTestUtil.java
@@ -26,6 +26,7 @@ import org.apache.lucene.util.SloppyMath;
import org.apache.lucene.util.TestUtil;
import com.carrotsearch.randomizedtesting.RandomizedContext;
+import com.carrotsearch.randomizedtesting.generators.BiasedNumbers;
/** static methods for testing geo */
public class GeoTestUtil {
@@ -63,7 +64,7 @@ public class GeoTestUtil {
// first pick a base value.
final double baseValue;
- int surpriseMe = random().nextInt(17);
+ int surpriseMe = random().nextInt(18);
if (surpriseMe == 0) {
// random bits
long lowBits = NumericUtils.doubleToSortableLong(low);
@@ -83,6 +84,8 @@ public class GeoTestUtil {
double delta = (high - low) / 360;
int block = random().nextInt(360);
baseValue = low + delta * block;
+ } else if (surpriseMe == 5) {
+ baseValue = BiasedNumbers.randomDoubleBetween(random(), low, high);
} else {
// distributed ~ evenly
baseValue = low + (high - low) * random().nextDouble();