Skip to content

Apache Lucene open-source search software

revert this est change until we can fix geo API border cases (LUCENE-6956)

Michael McCandlessb62c6715df12
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 f84d696b6c3..4236e88be6b 100644
--- a/lucene/sandbox/src/test/org/apache/lucene/util/BaseGeoPointTestCase.java
+++ b/lucene/sandbox/src/test/org/apache/lucene/util/BaseGeoPointTestCase.java
@@ -434,7 +434,8 @@ public abstract class BaseGeoPointTestCase extends LuceneTestCase {
} else {
result = -90 + 180.0 * random().nextDouble();
}
- return result;
+ // 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));
}
public double randomLon(boolean small) {
@@ -444,7 +445,8 @@ public abstract class BaseGeoPointTestCase extends LuceneTestCase {
} else {
result = -180 + 360.0 * random().nextDouble();
}
- return result;
+ // 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));
}
protected GeoRect randomRect(boolean small, boolean canCrossDateLine) {