Skip to content

Commit 5272689

Browse files
authored
Make sure the random generated shape can be indexed in GeoTilerTests (#84986)
Make sure the random generated shape can be indexed
1 parent f0dd106 commit 5272689

File tree

1 file changed

+2
-1
lines changed
  • x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/search/aggregations/bucket/geogrid

1 file changed

+2
-1
lines changed

x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/search/aggregations/bucket/geogrid/GeoGridTilerTestCase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ public void testGeoGridSetValuesBoundingBoxes_BoundedGeoShapeCellValues() throws
106106
int precision = randomIntBetween(0, 3);
107107
Geometry geometry = GeometryNormalizer.apply(Orientation.CCW, randomValueOtherThanMany(g -> {
108108
try {
109-
GeometryNormalizer.apply(Orientation.CCW, g);
109+
// make sure is a valid shape
110+
new GeoShapeIndexer(Orientation.CCW, "test").indexShape(g);
110111
return false;
111112
} catch (Exception e) {
112113
return true;

0 commit comments

Comments
 (0)