You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (Created) (JIRA)" <ji...@apache.org> on 2012/03/08 15:51:57 UTC
[jira] [Created] (LUCENE-3857) exceptions from other threads in
beforeclass/etc do not fail the test
exceptions from other threads in beforeclass/etc do not fail the test
---------------------------------------------------------------------
Key: LUCENE-3857
URL: https://issues.apache.org/jira/browse/LUCENE-3857
Project: Lucene - Java
Issue Type: Task
Reporter: Robert Muir
Lots of tests create indexes in beforeClass methods, but if an exception is thrown from another thread
it won't fail the test... e.g. this test passes:
{code}
public class TestExc extends LuceneTestCase {
@BeforeClass
public static void beforeClass() {
new Thread() {
public void run() {
throw new RuntimeException("boo!");
}
}.start();
}
public void test() { }
}
{code}
this is because the uncaught exception handler is in setup/teardown
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Assigned] (LUCENE-3857) exceptions from other threads in
beforeclass/etc do not fail the test
Posted by "Dawid Weiss (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dawid Weiss reassigned LUCENE-3857:
-----------------------------------
Assignee: Dawid Weiss
> exceptions from other threads in beforeclass/etc do not fail the test
> ---------------------------------------------------------------------
>
> Key: LUCENE-3857
> URL: https://issues.apache.org/jira/browse/LUCENE-3857
> Project: Lucene - Java
> Issue Type: Task
> Reporter: Robert Muir
> Assignee: Dawid Weiss
>
> Lots of tests create indexes in beforeClass methods, but if an exception is thrown from another thread
> it won't fail the test... e.g. this test passes:
> {code}
> public class TestExc extends LuceneTestCase {
> @BeforeClass
> public static void beforeClass() {
> new Thread() {
> public void run() {
> throw new RuntimeException("boo!");
> }
> }.start();
> }
>
> public void test() { }
> }
> {code}
> this is because the uncaught exception handler is in setup/teardown
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3857) exceptions from other threads in
beforeclass/etc do not fail the test
Posted by "Dawid Weiss (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225237#comment-13225237 ]
Dawid Weiss commented on LUCENE-3857:
-------------------------------------
This is solved by 3808 but I can also fix it on the trunk if you need a temporary fix.
> exceptions from other threads in beforeclass/etc do not fail the test
> ---------------------------------------------------------------------
>
> Key: LUCENE-3857
> URL: https://issues.apache.org/jira/browse/LUCENE-3857
> Project: Lucene - Java
> Issue Type: Task
> Reporter: Robert Muir
>
> Lots of tests create indexes in beforeClass methods, but if an exception is thrown from another thread
> it won't fail the test... e.g. this test passes:
> {code}
> public class TestExc extends LuceneTestCase {
> @BeforeClass
> public static void beforeClass() {
> new Thread() {
> public void run() {
> throw new RuntimeException("boo!");
> }
> }.start();
> }
>
> public void test() { }
> }
> {code}
> this is because the uncaught exception handler is in setup/teardown
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (LUCENE-3857) exceptions from other threads in
beforeclass/etc do not fail the test
Posted by "Dawid Weiss (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dawid Weiss resolved LUCENE-3857.
---------------------------------
Resolution: Fixed
Fix Version/s: 4.0
3.6
> exceptions from other threads in beforeclass/etc do not fail the test
> ---------------------------------------------------------------------
>
> Key: LUCENE-3857
> URL: https://issues.apache.org/jira/browse/LUCENE-3857
> Project: Lucene - Java
> Issue Type: Task
> Reporter: Robert Muir
> Assignee: Dawid Weiss
> Fix For: 3.6, 4.0
>
> Attachments: LUCENE-3857.patch
>
>
> Lots of tests create indexes in beforeClass methods, but if an exception is thrown from another thread
> it won't fail the test... e.g. this test passes:
> {code}
> public class TestExc extends LuceneTestCase {
> @BeforeClass
> public static void beforeClass() {
> new Thread() {
> public void run() {
> throw new RuntimeException("boo!");
> }
> }.start();
> }
>
> public void test() { }
> }
> {code}
> this is because the uncaught exception handler is in setup/teardown
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-3857) exceptions from other threads in
beforeclass/etc do not fail the test
Posted by "Dawid Weiss (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dawid Weiss updated LUCENE-3857:
--------------------------------
Attachment: LUCENE-3857.patch
A patch against the trunk extracting uncaught exceptions management to a class and test rule.
There are tiny differences to previous implementations -- the exception is logged to stderr at the time it is thrown and parent handler is NOT invoked (because it'd cause double detection and the default handler's job is only to dump the stack).
I will commit immediately?
> exceptions from other threads in beforeclass/etc do not fail the test
> ---------------------------------------------------------------------
>
> Key: LUCENE-3857
> URL: https://issues.apache.org/jira/browse/LUCENE-3857
> Project: Lucene - Java
> Issue Type: Task
> Reporter: Robert Muir
> Assignee: Dawid Weiss
> Attachments: LUCENE-3857.patch
>
>
> Lots of tests create indexes in beforeClass methods, but if an exception is thrown from another thread
> it won't fail the test... e.g. this test passes:
> {code}
> public class TestExc extends LuceneTestCase {
> @BeforeClass
> public static void beforeClass() {
> new Thread() {
> public void run() {
> throw new RuntimeException("boo!");
> }
> }.start();
> }
>
> public void test() { }
> }
> {code}
> this is because the uncaught exception handler is in setup/teardown
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org