Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C8A791CC for ; Thu, 8 Mar 2012 21:04:23 +0000 (UTC) Received: (qmail 52686 invoked by uid 500); 8 Mar 2012 21:04:21 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 52608 invoked by uid 500); 8 Mar 2012 21:04:21 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 52462 invoked by uid 99); 8 Mar 2012 21:04:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 21:04:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 21:04:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 7CD1F10C88 for ; Thu, 8 Mar 2012 21:03:58 +0000 (UTC) Date: Thu, 8 Mar 2012 21:03:58 +0000 (UTC) From: "Dawid Weiss (Updated) (JIRA)" To: dev@lucene.apache.org Message-ID: <1593607977.40397.1331240638512.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1279198136.38998.1331218317673.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (LUCENE-3857) exceptions from other threads in beforeclass/etc do not fail the test MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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