You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2014/03/16 05:50:23 UTC

[jira] [Updated] (LUCENE-2338) Some tests catch Exceptions in separate threads and just print a stack trace - the test does not fail

     [ https://issues.apache.org/jira/browse/LUCENE-2338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Smiley updated LUCENE-2338:
---------------------------------

    Fix Version/s:     (was: 4.7)
                   4.8

> 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 - Core
>          Issue Type: Test
>          Components: general/build
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.8
>
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)

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