You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2015/04/24 07:17:51 UTC

svn commit: r1675777 - /lucene/dev/branches/lucene6196/lucene/spatial/src/test/org/apache/lucene/spatial/spatial4j/RectIntersectionTestHelper.java

Author: dsmiley
Date: Fri Apr 24 05:17:51 2015
New Revision: 1675777

URL: http://svn.apache.org/r1675777
Log:
LUCENE-6196 testRelateWithRectangle shouldn't print last shape relation when we fail due to too few predicate occurrences.

Modified:
    lucene/dev/branches/lucene6196/lucene/spatial/src/test/org/apache/lucene/spatial/spatial4j/RectIntersectionTestHelper.java

Modified: lucene/dev/branches/lucene6196/lucene/spatial/src/test/org/apache/lucene/spatial/spatial4j/RectIntersectionTestHelper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6196/lucene/spatial/src/test/org/apache/lucene/spatial/spatial4j/RectIntersectionTestHelper.java?rev=1675777&r1=1675776&r2=1675777&view=diff
==============================================================================
--- lucene/dev/branches/lucene6196/lucene/spatial/src/test/org/apache/lucene/spatial/spatial4j/RectIntersectionTestHelper.java (original)
+++ lucene/dev/branches/lucene6196/lucene/spatial/src/test/org/apache/lucene/spatial/spatial4j/RectIntersectionTestHelper.java Fri Apr 24 05:17:51 2015
@@ -66,6 +66,12 @@ public abstract class RectIntersectionTe
 
       TestLog.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 RectIntersectionTe
             break;
 
           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);
   }