From 9c47a99ab6f5842a78f7df9f8ca1eb0dd53f3188 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 27 Apr 2011 12:39:08 +0000 Subject: [PATCH] fixed tests.iter.min to fail after specified iterations git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1097097 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/util/LuceneTestCase.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java b/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java index ba9064acc65..47cf19be312 100644 --- a/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java +++ b/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java @@ -1239,17 +1239,15 @@ public abstract class LuceneTestCase extends Assert { // only print iteration info if the user requested more than one iterations boolean verbose = VERBOSE && TEST_ITER > 1; - int lastIterFailed = -1; for (int i = 0; i < TEST_ITER; i++) { if (verbose) { System.out.println("\nNOTE: running iter=" + (1+i) + " of " + TEST_ITER); } super.runChild(arg0, arg1); if (testsFailed) { - lastIterFailed = i; - if (i == TEST_ITER_MIN - 1) { + if (i >= TEST_ITER_MIN - 1) { if (verbose) { - System.out.println("\nNOTE: iteration " + lastIterFailed + " failed !"); + System.out.println("\nNOTE: iteration " + i + " failed !"); } break; }