Skip to content

Apache Lucene open-source search software

LUCENE-2819: set this before interuppting also, to prevent false fails

Robert Muirfb7f94b41985
diff --git a/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java b/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java
index 641cf666dd6..92f4da813c7 100644
--- a/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java
+++ b/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java
@@ -543,6 +543,7 @@ public abstract class LuceneTestCase extends Assert {
} catch (InterruptedException e) { e.printStackTrace(); }
// try to stop the thread:
t.setUncaughtExceptionHandler(null);
+ Thread.setDefaultUncaughtExceptionHandler(null);
t.interrupt();
try {
t.join(THREAD_STOP_GRACE_MSEC);