lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjoy Ghosh (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2338) Some tests catch Exceptions in separate threads and just print a stack trace - the test does not fail
Date Wed, 24 Mar 2010 18:25:27 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849334#action_12849334
] 

Sanjoy Ghosh commented on LUCENE-2338:
--------------------------------------

Hi Uwe,

I can work on this bug.  Do you have any test cases to reproduce this behavior?

Sanjoy

> Some tests catch Exceptions in separate threads and just print a stack trace - the test
does not fail
> -----------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2338
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2338
>             Project: Lucene - Java
>          Issue Type: Test
>            Reporter: Uwe Schindler
>
> Some tests catch Exceptions in separate threads and just print a stack trace - the test
does not fail. The test should fail. Since LUCENE-2274, the LuceneTestCase(J4) class installs
an UncaughtExceptionHandler, so this type of catching and solely printing a Stack trace is
a bad idea. Problem is, that the run() method of threads is not allowed to throw checked Exceptions.
> Two possibilities:
> - Catch checked Exceptions in the run() method and wrap into RuntimeException or call
Assert.fail() instead
> - Use Executors

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message