Apache Lucene open-source search software
LUCENE-2822: don't mask the bug (or encourage similar bugs+masking), instead @Ignore so we get a loud warning
Robert Muirf16706f50d34
diff --git a/lucene/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java b/lucene/src/test/org/apache/lucene/search/TestTimeLimitingCollector.javaindex 3be1d4e9180..6fd423c66fb 100644--- a/lucene/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java+++ b/lucene/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java@@ -30,12 +30,14 @@ import org.apache.lucene.search.TimeLimitingCollector.TimeExceededException;import org.apache.lucene.store.Directory;import org.apache.lucene.util.LuceneTestCase;import org.apache.lucene.util.ThreadInterruptedException;+import org.junit.Ignore;/*** Tests the {@link TimeLimitingCollector}. This test checks (1) search* correctness (regardless of timeout), (2) expected timeout behavior,* and (3) a sanity test with multiple searching threads.*/+@Ignore("broken: see https://issues.apache.org/jira/browse/LUCENE-2822")public class TestTimeLimitingCollector extends LuceneTestCase {private static final int SLOW_DOWN = 3;private static final long TIME_ALLOWED = 17 * SLOW_DOWN; // so searches can find about 17 docs.diff --git a/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java b/lucene/src/test/org/apache/lucene/util/LuceneTestCase.javaindex e4a687b573e..d40e703f8e9 100644--- a/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java+++ b/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java@@ -552,9 +552,7 @@ public abstract class LuceneTestCase extends Assert {if (t.isAlive() &&!rogueThreads.containsKey(t) &&- t != Thread.currentThread() &&- // TODO: TimeLimitingCollector starts a thread statically.... WTF?!- !t.getName().equals("TimeLimitedCollector timer thread")) {+ t != Thread.currentThread()) {System.err.println("WARNING: " + context + " left thread running: " + t);rogueThreads.put(t, true);rogueCount++;