Apache Solr open-source search software
LUCENE-7173: Iterate at least 100 times each for polygon construction when testing.
Karl Wrighta06a6dfaad3e
diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.javaindex 410618c829e..5aaa8357a44 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 polefinal 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);