Skip to content

Apache Lucene open-source search software

SOLR-12471: testLLPDecodeIsStableAndPrice -- raise threshold some more

David Smiley8eb006e4ed05
diff --git a/solr/core/src/java/org/apache/solr/schema/LatLonPointSpatialField.java b/solr/core/src/java/org/apache/solr/schema/LatLonPointSpatialField.java
index dfdd0744c63..48206f5fca5 100644
--- a/solr/core/src/java/org/apache/solr/schema/LatLonPointSpatialField.java
+++ b/solr/core/src/java/org/apache/solr/schema/LatLonPointSpatialField.java
@@ -87,7 +87,7 @@ public class LatLonPointSpatialField extends AbstractSpatialFieldType implements
public static String decodeDocValueToString(long value) {
final double latDouble = GeoEncodingUtils.decodeLatitude((int) (value >> 32));
final double lonDouble = GeoEncodingUtils.decodeLongitude((int) (value & 0xFFFFFFFFL));
- // This # decimal places gets us close to our available precision to 1.37cm; we have a test for it.
+ // This # decimal places gets us close to our available precision to 1.40cm; we have a test for it.
// CEILING round-trips (decode then re-encode then decode to get identical results). Others did not. It also
// reverses the "floor" that occurred when we encoded.
final int DECIMAL_PLACES = 7;
diff --git a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
index e5dc6918c73..63924f59201 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
@@ -168,7 +168,8 @@ public class TestSolr4Spatial2 extends SolrTestCaseJ4 {
//max found by trial & error. If we used 8 decimal places then we could get down to 1.04cm accuracy but then we
// lose the ability to round-trip -- 40 would become 39.99999997 (ugh).
- assertTrue("deltaCm too high: " + deltaCentimeters, deltaCentimeters <= 1.37);
+ assertTrue("deltaCm too high: " + deltaCentimeters, deltaCentimeters < 1.40);
+ // Pt(x=105.29894270124083,y=-0.4371673760042398) to Pt(x=105.2989428,y=-0.4371673) is 1.38568
}
@Test