LUCENE-4736: ignore TimerThread zombies on J9.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1440961 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dawid Weiss 2013-01-31 14:02:27 +00:00
parent 727739fc1f
commit 09ca0ac906
1 changed files with 12 additions and 0 deletions

View File

@ -23,8 +23,20 @@ import com.carrotsearch.randomizedtesting.ThreadFilter;
* Last minute patches.
*/
public class QuickPatchThreadsFilter implements ThreadFilter {
static final boolean isJ9;
static {
isJ9 = System.getProperty("java.vm.info", "<?>").contains("IBM J9");
}
@Override
public boolean reject(Thread t) {
if (isJ9) {
StackTraceElement [] stack = t.getStackTrace();
if (stack.length > 0 && stack[stack.length - 1].getClassName().equals("java.util.Timer$TimerImpl")) {
return true; // LUCENE-4736
}
}
return false;
}
}