mirror of https://github.com/apache/lucene.git
Fix test to recognize null polygon response.
This commit is contained in:
parent
2342290816
commit
5bb9084bd5
|
@ -145,6 +145,9 @@ public class Geo3dRptTest extends RandomSpatialOpStrategyTestCase {
|
|||
final int convexPointIndex = random().nextInt(vertexCount); //If we get this wrong, hopefully we get IllegalArgumentException
|
||||
try {
|
||||
final GeoShape shape = GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE, geoPoints);
|
||||
if (shape == null) {
|
||||
continue;
|
||||
}
|
||||
return new Geo3dShape(shape, ctx);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// This is what happens when we create a shape that is invalid. Although it is conceivable that there are cases where
|
||||
|
|
|
@ -186,6 +186,9 @@ public abstract class Geo3dShapeRectRelationTestCase extends RandomizedShapeTest
|
|||
}
|
||||
try {
|
||||
final GeoShape shape = GeoPolygonFactory.makeGeoPolygon(planetModel, geoPoints);
|
||||
if (shape == null) {
|
||||
continue;
|
||||
}
|
||||
return new Geo3dShape(planetModel, shape, ctx);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// This is what happens when we create a shape that is invalid. Although it is conceivable that there are cases where
|
||||
|
|
Loading…
Reference in New Issue