Apache Lucene open-source search software
LUCENE-6196 testRelateWithRectangle shouldn't print last shape relation when we fail due to too few predicate occurrences.
David Wayne Smiley40daf30a83ff
diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/spatial4j/RectIntersectionTestHelper.java b/lucene/spatial/src/test/org/apache/lucene/spatial/spatial4j/RectIntersectionTestHelper.javaindex a040e02abf1..9040409d43f 100644--- a/lucene/spatial/src/test/org/apache/lucene/spatial/spatial4j/RectIntersectionTestHelper.java+++ b/lucene/spatial/src/test/org/apache/lucene/spatial/spatial4j/RectIntersectionTestHelper.java@@ -66,6 +66,12 @@ public abstract class RectIntersectionTestHelper<S extends Shape> extends RandomTestLog.clear();+ if (laps > MINLAPSPERCASE * 1000) {+ fail("Did not find enough intersection cases in a reasonable number" ++ " of random attempts. CWIDbD: " + i_C + "," + i_W + "," + i_I + "," + i_D + "," + i_bboxD+ + " Laps exceeded " + MINLAPSPERCASE * 1000);+ }+Point nearP = randomPointIn(ctx.getWorldBounds());S s = generateRandomShape(nearP);@@ -148,15 +154,13 @@ public abstract class RectIntersectionTestHelper<S extends Shape> extends Randombreak;default: fail(""+ic);- }+ } // switch} catch (AssertionError e) {onAssertFail(e, s, r, ic);}- if (laps > MINLAPSPERCASE * 1000)- fail("Did not find enough intersection cases in a reasonable number" +- " of random attempts. CWIDbD: "+i_C+","+i_W+","+i_I+","+i_D+","+i_bboxD- + " Laps exceeded "+MINLAPSPERCASE * 1000);- }++ } // while loop+System.out.println("Laps: "+laps + " CWIDbD: "+i_C+","+i_W+","+i_I+","+i_D+","+i_bboxD);}