LUCENE-8350: Fix for time-out in RandomGeoPolygonTests

This commit is contained in:
ivera 2018-06-08 12:47:26 +02:00
parent 417940cdd7
commit 36b7cdde06
1 changed files with 2 additions and 1 deletions

View File

@ -120,11 +120,12 @@ public class RandomGeoPolygonTest extends RandomGeo3dShapeGenerator {
referencePoint = randomGeoPoint(planetModel);
}
final int n = random().nextInt(4) + 4;
final List<GeoPoint> points = new ArrayList<>(n);
List<GeoPoint> orderedPoints = null;
GeoPolygon polygon = null;
GeoPolygon largePolygon = null;
do {
final List<GeoPoint> points = new ArrayList<>(n);
double maxDistance = random().nextDouble() * limitDistance;
//if distance is too small we can fail
//building the polygon.