From 09ca0ac906a9fec70b4ed823433a3249f3b76523 Mon Sep 17 00:00:00 2001 From: Dawid Weiss Date: Thu, 31 Jan 2013 14:02:27 +0000 Subject: [PATCH] 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 --- .../apache/lucene/util/QuickPatchThreadsFilter.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java b/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java index e9278c7103e..f2924c2ecb6 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java +++ b/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java @@ -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; } }