mirror of https://github.com/apache/lucene.git
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:
parent
79133e4f04
commit
f16706f50d
|
@ -30,12 +30,14 @@ import org.apache.lucene.search.TimeLimitingCollector.TimeExceededException;
|
||||||
import org.apache.lucene.store.Directory;
|
import org.apache.lucene.store.Directory;
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.lucene.util.ThreadInterruptedException;
|
import org.apache.lucene.util.ThreadInterruptedException;
|
||||||
|
import org.junit.Ignore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the {@link TimeLimitingCollector}. This test checks (1) search
|
* Tests the {@link TimeLimitingCollector}. This test checks (1) search
|
||||||
* correctness (regardless of timeout), (2) expected timeout behavior,
|
* correctness (regardless of timeout), (2) expected timeout behavior,
|
||||||
* and (3) a sanity test with multiple searching threads.
|
* 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 {
|
public class TestTimeLimitingCollector extends LuceneTestCase {
|
||||||
private static final int SLOW_DOWN = 3;
|
private static final int SLOW_DOWN = 3;
|
||||||
private static final long TIME_ALLOWED = 17 * SLOW_DOWN; // so searches can find about 17 docs.
|
private static final long TIME_ALLOWED = 17 * SLOW_DOWN; // so searches can find about 17 docs.
|
||||||
|
|
|
@ -552,9 +552,7 @@ public abstract class LuceneTestCase extends Assert {
|
||||||
|
|
||||||
if (t.isAlive() &&
|
if (t.isAlive() &&
|
||||||
!rogueThreads.containsKey(t) &&
|
!rogueThreads.containsKey(t) &&
|
||||||
t != Thread.currentThread() &&
|
t != Thread.currentThread()) {
|
||||||
// TODO: TimeLimitingCollector starts a thread statically.... WTF?!
|
|
||||||
!t.getName().equals("TimeLimitedCollector timer thread")) {
|
|
||||||
System.err.println("WARNING: " + context + " left thread running: " + t);
|
System.err.println("WARNING: " + context + " left thread running: " + t);
|
||||||
rogueThreads.put(t, true);
|
rogueThreads.put(t, true);
|
||||||
rogueCount++;
|
rogueCount++;
|
||||||
|
|
Loading…
Reference in New Issue