lucene-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/LUCENE-8512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16624987#comment-16624987
] 

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: https://issues.apache.org/jira/browse/LUCENE-8512
>             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>(GeoComplexPolygon.java:239)
>    [junit4]    > at org.apache.lucene.spatial3d.geom.GeoPolygonFactory$BestShape.createGeoComplexPolygon(GeoPolygonFactory.java:465)
>    [junit4]    > at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeLargeGeoPolygon(GeoPolygonFactory.java:389)
>    [junit4]    > at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeGeoPolygon(GeoPolygonFactory.java:226)
>    [junit4]    > at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeGeoPolygon(GeoPolygonFactory.java:142)
>    [junit4]    > at org.apache.lucene.spatial3d.geom.RandomGeoPolygonTest.testComparePolygons(RandomGeoPolygonTest.java:157)
>    [junit4]    > at org.apache.lucene.spatial3d.geom.RandomGeoPolygonTest.testCompareSmallPolygons(RandomGeoPolygonTest.java:109)
>    [junit4]    > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
>    [junit4]    > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>    [junit4]    > at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>    [junit4]    > at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>    [junit4]    > at java.base/java.lang.Thread.run(Thread.java:844)
>    [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,
timezone=America/La_Paz{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message