try to avoid jre bug in test, take 3

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1080838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-03-12 01:35:49 +00:00
parent 99aed2c176
commit 4ff404d85b
1 changed files with 2 additions and 1 deletions

View File

@ -586,7 +586,8 @@ public abstract class LuceneTestCase extends Assert {
// try to stop the thread:
t.setUncaughtExceptionHandler(null);
Thread.setDefaultUncaughtExceptionHandler(null);
t.interrupt();
if (!t.getName().startsWith("SyncThread")) // avoid zookeeper jre crash
t.interrupt();
try {
t.join(THREAD_STOP_GRACE_MSEC);
} catch (InterruptedException e) { e.printStackTrace(); }