lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <>
Subject Re: LuceneTestCase.threadCleanup incorrectly reports left running threads
Date Thu, 23 Dec 2010 07:09:19 GMT
I ran the test from both eclipse and Ant, and got similar warnings.

With your patch most of the 'false alarms' do not show up again, but I still
see a strange failure. I add this to after the System.err.print("left thread
running"): System.err.println(Arrays.toString(t.getStackTrace())); -- it
prints the stack trace. And here is what I get:

    [junit] ------------- Standard Error -----------------
    [junit] WARNING: test method: 'testIndexAndSearchTasks' left thread
running: Thread[file lock watchdog,6,main]
    [junit] [java.lang.Object.wait(Native Method),
    [junit] RESOURCE LEAK: test method: 'testIndexAndSearchTasks' left 1
thread(s) running
    [junit] NOTE: reproduce with: ant test -Dtestcase=TestPerfTasksLogic

I don't know where this Timer is created, but I'll dig more.

At any rate, I think your patch is good, and perhaps we should add the
stacktrace print as well, to help with the debugging?


On Wed, Dec 22, 2010 at 9:35 PM, Robert Muir <> wrote:

>  static {
> +    // just a hack for things like eclipse threads
> +    for (Thread t : Thread.getAllStackTraces().keySet()) {
> +      rogueThreads.put(t, true);
> +    }
> +  }

View raw message