From b62c6715df12616785732cc1011e11fe4faa16ca Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Sun, 24 Jan 2016 16:48:51 -0500 Subject: [PATCH] revert this est change until we can fix geo API border cases (LUCENE-6956) --- .../test/org/apache/lucene/util/BaseGeoPointTestCase.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) {