lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <>
Subject [jira] [Commented] (LUCENE-8512) GeoPolygon test failure
Date Sun, 23 Sep 2018 06:36:00 GMT


Karl Wright commented on LUCENE-8512:

Generally, we realized a while back that when a starting point is on an edge, we can't use
it.  The problem is that we realized this was true for intersection points, but we never put
in code that would prevent it for test points.

There is one test point that is passed into the GeoComplexPolygon constructor which is computed
by the factory.  There is a second test point which is used as an alternative to the first
test point for situations where the first test point doesn't work out.  There is nothing that
stops us from using a bad second test point, however, and that's what the problem is with
this test case.  I'm also concerned that there's no real check to be certain that the *first*
test point is valid either -- it seems to me that the constructor should throw an IllegalArgumentException
in that case, and the factory should try another test point then.

I'm not sure that the second test point is necessary any longer either, since we have now
multiple traversal strategies available.  I'm going to try to disable it entirely and see
what happens.  Our tests should be sufficient to tell us if this is a bad idea.

> GeoPolygon test failure
> -----------------------
>                 Key: LUCENE-8512
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial3d
>            Reporter: Ignacio Vera
>            Assignee: Karl Wright
>            Priority: Major
>         Attachments: LUCENE-8512.patch
> {code:java}
>   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=RandomGeoPolygonTest
-Dtests.method=testCompareSmallPolygons -Dtests.seed=7BA5F34669E15F97 -Dtests.slow=true -Dtests.badapples=true
-Dtests.locale=es-CU -Dtests.timezone=America/La_Paz -Dtests.asserts=true -Dtests.file.encoding=UTF8
>    [junit4] FAILURE 0.01s | RandomGeoPolygonTest.testCompareSmallPolygons {seed=[7BA5F34669E15F97:F73170EC892310D]}
>    [junit4]    > Throwable #1: java.lang.AssertionError: Test point1 not correctly
in/out of set according to test point2
>    [junit4]    > at __randomizedtesting.SeedInfo.seed([7BA5F34669E15F97:F73170EC892310D]:0)
>    [junit4]    > at org.apache.lucene.spatial3d.geom.GeoComplexPolygon.<init>(
>    [junit4]    > at org.apache.lucene.spatial3d.geom.GeoPolygonFactory$BestShape.createGeoComplexPolygon(
>    [junit4]    > at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeLargeGeoPolygon(
>    [junit4]    > at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeGeoPolygon(
>    [junit4]    > at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeGeoPolygon(
>    [junit4]    > at org.apache.lucene.spatial3d.geom.RandomGeoPolygonTest.testComparePolygons(
>    [junit4]    > at org.apache.lucene.spatial3d.geom.RandomGeoPolygonTest.testCompareSmallPolygons(
>    [junit4]    > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>    [junit4]    > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
>    [junit4]    > at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
>    [junit4]    > at java.base/java.lang.reflect.Method.invoke(
>    [junit4]    > at java.base/
>    [junit4] OK      0.34s | RandomGeoPolygonTest.testCompareSmallPolygons {seed=[7BA5F34669E15F97:3DDFF260BF592657]}
>    [junit4] OK      0.35s | RandomGeoPolygonTest.testCompareSmallPolygons {seed=[7BA5F34669E15F97:EA54A4DADB0E1105]}
>    [junit4]   2> NOTE: test params are: codec=HighCompressionCompressingStoredFields(storedFieldsFormat=CompressingStoredFieldsFormat(compressionMode=HIGH_COMPRESSION,
chunkSize=1818, maxDocsPerChunk=791, blockSize=936), termVectorsFormat=CompressingTermVectorsFormat(compressionMode=HIGH_COMPRESSION,
chunkSize=1818, blockSize=936)), sim=RandomSimilarity(queryNorm=false): {}, locale=es-CU,

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message