You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by kw...@apache.org on 2016/04/08 00:03:06 UTC

lucene-solr:branch_6x: LUCENE-7173: Iterate at least 100 times each for polygon construction when testing.

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 347b9f0d7 -> ecbf1a4d8


LUCENE-7173: Iterate at least 100 times each for polygon construction when testing.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/ecbf1a4d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ecbf1a4d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ecbf1a4d

Branch: refs/heads/branch_6x
Commit: ecbf1a4d83d4816241679c37f196c1f5b3d1b88c
Parents: 347b9f0
Author: Karl Wright <Da...@gmail.com>
Authored: Thu Apr 7 17:59:33 2016 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Thu Apr 7 18:01:55 2016 -0400

----------------------------------------------------------------------
 .../org/apache/lucene/spatial3d/TestGeo3DPoint.java   | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ecbf1a4d/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java
index 410618c..5aaa835 100644
--- a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java
+++ b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java
@@ -759,10 +759,16 @@ public class TestGeo3DPoint extends LuceneTestCase {
     final PlanetModel pm = PlanetModel.WGS84;
     // Pick a random pole
     final GeoPoint randomPole = new GeoPoint(pm, Math.toRadians(GeoTestUtil.nextLatitude()), Math.toRadians(GeoTestUtil.nextLongitude()));
-    // Create a polygon that's less than 180 degrees
-    final Polygon clockWise = makePoly(pm, randomPole, true, true);
-    // Create a polygon that's greater than 180 degrees
-    final Polygon counterClockWise = makePoly(pm, randomPole, false, true);
+    int iters = atLeast(100);
+    for (int i = 0; i < iters; i++) {
+      // Create a polygon that's less than 180 degrees
+      final Polygon clockWise = makePoly(pm, randomPole, true, true);
+    }
+    iters = atLeast(100);
+    for (int i = 0; i < iters; i++) {
+      // Create a polygon that's greater than 180 degrees
+      final Polygon counterClockWise = makePoly(pm, randomPole, false, true);
+    }
   }
   
   protected static double MINIMUM_EDGE_ANGLE = Math.toRadians(5.0);