TestGeoUtils.testRandomCircleToBBox() failure: point was within the distance according to haversin, but the bbox doesn't contain it [LUCENE-7143]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
My Jenkins found a reproducible seed on master:
```
Checking out Revision 6d288704c447a129fc73bdc03d36fe0b6cc6fe4b (refs/remotes/origin/master)
[...]
[junit4] Suite: org.apache.lucene.spatial.util.TestGeoUtils
[junit4] 1> small=true centerLat=52.21127015602516 cetnerLon=71.84139037527612 radiusMeters=0.14260981556857288
[junit4] 1> bbox: lat=52.21126887493939 to 52.21127143711092 lon=71.84138828456638 to 71.84139246598588
[junit4] 1> point: lat=52.21127143918468 lon=71.84139011107445
[junit4] 1> haversin: 0.13440918696036408
[junit4] 2> NOTE: download the large Jenkins line-docs file by running 'ant get-jenkins-line-docs' in the lucene directory.
[junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestGeoUtils -Dtests.method=testRandomCircleToBBox -Dtests.seed=9B752AD620F732A2 -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=bg -Dtests.timezone=Asia/Beirut -Dtests.asserts=true -Dtests.file.encoding=UTF-8
[junit4] FAILURE 0.98s J2 | TestGeoUtils.testRandomCircleToBBox <<<
[junit4] > Throwable #1: java.lang.AssertionError: point was within the distance according to haversin, but the bbox doesn't contain it
[junit4] > at __randomizedtesting.SeedInfo.seed([9B752AD620F732A2:AD6B2C633DDF9D8B]:0)
[junit4] > at org.apache.lucene.spatial.util.TestGeoUtils.testRandomCircleToBBox(TestGeoUtils.java:226)
[junit4] > at java.lang.Thread.run(Thread.java:745)
[junit4] 2> NOTE: test params are: codec=Asserting(Lucene60): {}, docValues:{}, maxPointsInLeafNode=182, maxMBSortInHeap=4.93231148395932, sim=ClassicSimilarity, locale=bg, timezone=Asia/Beirut
[junit4] 2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_45 (64-bit)/cpus=16,threads=1,free=396287592,total=514850816
[junit4] 2> NOTE: All tests run in this JVM: [TestGeoUtils]
[junit4] Completed [1/3 (1!)] on J2 in 6.37s, 9 tests, 1 failure <<< FAILURES!
```
---
Migrated from [LUCENE-7143](https://issues.apache.org/jira/browse/LUCENE-7143) by Steven Rowe (@sarowe)
Attachments: [LUCENE-7143_test.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7143/LUCENE-7143_test.patch), [LUCENE-7143.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7143/LUCENE-7143.patch)
Contributor guide
Research direction
Start with org.apache.lucene.spatial.util.TestGeoUtils.testRandomCircleToBBox at TestGeoUtils.java:226 and reproduce it with the provided ant command and seed. Inspect the circle-to-bounding-box behavior involved in the failing assertion; done means the reproducible test passes while preserving the distance and bounding-box expectations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100