You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "ioanatia (via GitHub)" <gi...@apache.org> on 2023/02/02 14:45:11 UTC
[GitHub] [lucene] ioanatia commented on issue #11829: Reproducible TestShapeDocValues failure
ioanatia commented on issue #11829:
URL: https://github.com/apache/lucene/issues/11829#issuecomment-1413856068
the test fails because right from the start the random generated polygon is invalid:
https://github.com/apache/lucene/blob/5acca826330b2afc15b6a2d5e2134d7d1a64e4a9/lucene/core/src/test/org/apache/lucene/document/TestShapeDocValues.java#L89
we can modify `BaseXYShapeTestCase.ShapeType.POLYGON.nextShape()` to always return a polygon that would not fail the self intersections check:
https://github.com/apache/lucene/blob/5acca826330b2afc15b6a2d5e2134d7d1a64e4a9/lucene/core/src/test/org/apache/lucene/document/BaseXYShapeTestCase.java#L229
if we change `random().nextBoolean()` to `true` - the test succeeds when it's run with the same seed like in the PR description.
it looks like this is a safe change since `POLYGON.nextShape()` has limited usage.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org