Skip to content

Apache Lucene open-source search software

don't pre-quantize our randomly generated lat/lon: this weakens test coverage

Michael McCandlessed7a3a606c59
diff --git a/lucene/sandbox/src/test/org/apache/lucene/util/BaseGeoPointTestCase.java b/lucene/sandbox/src/test/org/apache/lucene/util/BaseGeoPointTestCase.java
index 4236e88be6b..f84d696b6c3 100644
--- a/lucene/sandbox/src/test/org/apache/lucene/util/BaseGeoPointTestCase.java
+++ b/lucene/sandbox/src/test/org/apache/lucene/util/BaseGeoPointTestCase.java
@@ -434,8 +434,7 @@ public abstract class BaseGeoPointTestCase extends LuceneTestCase {
} else {
result = -90 + 180.0 * random().nextDouble();
}
- // TODO: we should not do this here! it weakens the test, and users don't pre-quantize the lat/lons they send us:
- return unscaleLat(scaleLat(result));
+ return result;
}
public double randomLon(boolean small) {
@@ -445,8 +444,7 @@ public abstract class BaseGeoPointTestCase extends LuceneTestCase {
} else {
result = -180 + 360.0 * random().nextDouble();
}
- // TODO: we should not do this here! it weakens the test, and users don't pre-quantize the lat/lons they send us:
- return unscaleLon(scaleLon(result));
+ return result;
}
protected GeoRect randomRect(boolean small, boolean canCrossDateLine) {