LUCENE-10310: Fix test error in TestXYDocValuesQueries#testRandomDistanceHuge (#537)

We create random circles using ShapeTestUtils which is safe.
This commit is contained in:
Ignacio Vera 2021-12-13 12:01:20 +01:00 committed by GitHub
parent 2f634b0d95
commit 5207aae527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -110,6 +110,9 @@ Other
* LUCENE-10303: Upgrade log4j to 2.15.0. (Tomoko Uchida)
* LUCENE-10310: TestXYDocValuesQueries#doRandomDistanceTest does not produce random circles with radius
with '0' value any longer.
======================= Lucene 9.0.0 =======================
New Features

View File

@ -1341,9 +1341,10 @@ public abstract class BaseXYPointTestCase extends LuceneTestCase {
IndexSearcher searcher = newSearcher(reader);
for (int i = 0; i < numQueries; i++) {
float x = nextX();
float y = nextY();
float radius = (Float.MAX_VALUE / 2) * random().nextFloat();
XYCircle circle = ShapeTestUtil.nextCircle();
float x = circle.getX();
float y = circle.getY();
float radius = circle.getRadius();
BitSet expected = new BitSet();
for (int doc = 0; doc < reader.maxDoc(); doc++) {