@@ -328,7 +328,6 @@ public void testShapeFetchingPath() throws Exception {
328
328
assertHitCount (result , 1 );
329
329
}
330
330
331
- @ AwaitsFix (bugUrl = "https://github.com/elastic/elasticsearch/issues/37356" )
332
331
public void testQueryRandomGeoCollection () throws Exception {
333
332
// Create a random geometry collection.
334
333
GeometryCollectionBuilder gcb = RandomShapeGenerator .createGeometryCollection (random ());
@@ -358,6 +357,9 @@ public void testQueryRandomGeoCollection() throws Exception {
358
357
geoShapeQueryBuilder .relation (ShapeRelation .INTERSECTS );
359
358
SearchResponse result = client ().prepareSearch ("test" ).setTypes ("type" ).setQuery (geoShapeQueryBuilder ).get ();
360
359
assertSearchResponse (result );
360
+ assumeTrue ("Skipping the check for the polygon with a degenerated dimension until "
361
+ +" https://issues.apache.org/jira/browse/LUCENE-8634 is fixed" ,
362
+ randomPoly .maxLat - randomPoly .minLat > 8.4e-8 && randomPoly .maxLon - randomPoly .minLon > 8.4e-8 );
361
363
assertHitCount (result , 1 );
362
364
}
363
365
@@ -386,7 +388,8 @@ public void testRandomGeoCollectionQuery() throws Exception {
386
388
}
387
389
gcb .shape (new PolygonBuilder (cb ));
388
390
389
- logger .info ("Created Random GeometryCollection containing {} shapes" , gcb .numShapes ());
391
+ logger .info ("Created Random GeometryCollection containing {} shapes using {} tree" , gcb .numShapes (),
392
+ usePrefixTrees ? "default" : "quadtree" );
390
393
391
394
if (usePrefixTrees == false ) {
392
395
client ().admin ().indices ().prepareCreate ("test" ).addMapping ("type" , "location" , "type=geo_shape" )
@@ -407,7 +410,11 @@ public void testRandomGeoCollectionQuery() throws Exception {
407
410
geoShapeQueryBuilder .relation (ShapeRelation .INTERSECTS );
408
411
SearchResponse result = client ().prepareSearch ("test" ).setTypes ("type" ).setQuery (geoShapeQueryBuilder ).get ();
409
412
assertSearchResponse (result );
410
- assertTrue (result .getHits ().getTotalHits () > 0 );
413
+ assumeTrue ("Skipping the check for the polygon with a degenerated dimension until "
414
+ +" https://issues.apache.org/jira/browse/LUCENE-8634 is fixed" ,
415
+ randomPoly .maxLat - randomPoly .minLat > 8.4e-8 && randomPoly .maxLon - randomPoly .minLon > 8.4e-8 );
416
+ assertTrue ("query: " + geoShapeQueryBuilder .toString () + " doc: " + Strings .toString (docSource ),
417
+ result .getHits ().getTotalHits () > 0 );
411
418
}
412
419
413
420
/** tests querying a random geometry collection with a point */
0 commit comments