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