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 D755C9D9E for ; Fri, 10 Feb 2012 22:45:22 +0000 (UTC) Received: (qmail 41912 invoked by uid 500); 10 Feb 2012 22:45:21 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 41664 invoked by uid 500); 10 Feb 2012 22:45:20 -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 41657 invoked by uid 99); 10 Feb 2012 22:45:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2012 22:45:20 +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; Fri, 10 Feb 2012 22:45: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 701A01AF772 for ; Fri, 10 Feb 2012 22:44:59 +0000 (UTC) Date: Fri, 10 Feb 2012 22:44:59 +0000 (UTC) From: "Dawid Weiss (Updated) (JIRA)" To: dev@lucene.apache.org Message-ID: <1832412671.26306.1328913899460.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1386840982.16077.1328730179588.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (LUCENE-3762) Upgrade JUnit to 4.10, refactor state-machine of detecting setUp/tearDown call chaining. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-3762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dawid Weiss updated LUCENE-3762: -------------------------------- Attachment: LUCENE-3762.patch Updated patch with tests of what's emitted and when. > Upgrade JUnit to 4.10, refactor state-machine of detecting setUp/tearDown call chaining. > ---------------------------------------------------------------------------------------- > > Key: LUCENE-3762 > URL: https://issues.apache.org/jira/browse/LUCENE-3762 > Project: Lucene - Java > Issue Type: Improvement > Reporter: Dawid Weiss > Assignee: Dawid Weiss > Priority: Trivial > Fix For: 3.6, 4.0 > > Attachments: LUCENE-3762.patch, LUCENE-3762.patch, LUCENE-3762.patch > > > Both Lucene and Solr use JUnit 4.7. I suggest we move forward and upgrade to JUnit 4.10 which provides several infrastructural changes (serializable Description objects, class-level rules, various tweaks). JUnit 4.10 also changes (or fixes, depends how you look at it) the order in which @Before/@After hooks and @Rules are applied. This makes the old state-machine in LuceneTestCase fail (because the order is changed). > I rewrote the state machine and used a different, I think simpler, although Uwe may disagree :), mechanism in which the hook methods setUp/ tearDown are still there, but they are empty at the top level and serve only to detect whether subclasses chain super.setUp/tearDown properly (if they override anything). > In the long term, I would love to just get rid of public setup/teardown methods and make them private (so that they cannot be overriden or even seen by subclasses) but this will require changes to the runner itself. -- 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