You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by iv...@apache.org on 2018/06/08 10:50:31 UTC
lucene-solr:branch_7x: LUCENE-8350: Fix for time-out in
RandomGeoPolygonTests
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x 933ea9235 -> e4cbbcfb5
LUCENE-8350: Fix for time-out in RandomGeoPolygonTests
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/e4cbbcfb
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/e4cbbcfb
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/e4cbbcfb
Branch: refs/heads/branch_7x
Commit: e4cbbcfb594baf5e9cd01d0cad808f6b5cac4f0f
Parents: 933ea923
Author: ivera <iv...@eso.org>
Authored: Fri Jun 8 12:48:10 2018 +0200
Committer: ivera <iv...@eso.org>
Committed: Fri Jun 8 12:48:10 2018 +0200
----------------------------------------------------------------------
.../org/apache/lucene/spatial3d/geom/RandomGeoPolygonTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e4cbbcfb/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/RandomGeoPolygonTest.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/RandomGeoPolygonTest.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/RandomGeoPolygonTest.java
index 4507450..07361e8 100644
--- a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/RandomGeoPolygonTest.java
+++ b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/RandomGeoPolygonTest.java
@@ -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.