LUCENE-2822: don't mask the bug (or encourage similar bugs+masking), instead @Ignore so we get a loud warning

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1053067 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2010-12-27 13:50:56 +00:00
parent 79133e4f04
commit f16706f50d
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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++;