Skip to content

Commit

Permalink
Fix failure on GeoShapeQueryTestCase#testRandomGeoCollectionQuery (#8…
Browse files Browse the repository at this point in the history
…7916) (#87919)

Use the safer GeometryTestUtils instead of Lucene GeoTestUtil to generate random polygons.
  • Loading branch information
iverase authored Jun 22, 2022
1 parent 0d8412a commit 5b8b981
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ public void testShapeFetchingPath() throws Exception {
public void testRandomGeoCollectionQuery() throws Exception {
// Create a random geometry collection to index.
GeometryCollection<Geometry> randomIndexCollection = GeometryTestUtils.randomGeometryCollectionWithoutCircle(false);
org.apache.lucene.geo.Polygon randomPoly = GeoTestUtil.nextPolygon();
Polygon polygon = new Polygon(new LinearRing(randomPoly.getPolyLons(), randomPoly.getPolyLats()));
Polygon polygon = GeometryTestUtils.randomPolygon(false);
List<Geometry> indexGeometries = new ArrayList<>();
for (Geometry geometry : randomIndexCollection) {
indexGeometries.add(geometry);
Expand Down

0 comments on commit 5b8b981

Please sign in to comment.