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:58 UTC

lucene-solr:branch_6x: LUCENE-8350: Fix for time-out in RandomGeoPolygonTests

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x fcd7fc199 -> 63d7f5d90


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/63d7f5d9
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/63d7f5d9
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/63d7f5d9

Branch: refs/heads/branch_6x
Commit: 63d7f5d902d8f6ca22dd442df505b47660cc450d
Parents: fcd7fc1
Author: ivera <iv...@eso.org>
Authored: Fri Jun 8 12:48:54 2018 +0200
Committer: ivera <iv...@eso.org>
Committed: Fri Jun 8 12:48:54 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/63d7f5d9/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.