lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Rowe (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3762) Upgrade JUnit to 4.10, refactor state-machine of detecting setUp/tearDown call chaining.
Date Tue, 14 Feb 2012 23:53:59 GMT


Steven Rowe commented on LUCENE-3762:

Dawid, today I've seen the following test reproduction message (from Maven, but running Lucene/Solr
tests under Maven has caused this before):

NOTE: reproduce with: ant test -Dtestcase=UIMABaseAnalyzerTest -Dtestmethod=testRandomStrings(org.apache.lucene.analysis.uima.UIMABaseAnalyzerTest)
-Dtests.seed=2be0c24a1df9b25e:-42f203968285c6ed:5f8c85cdbae32724 -Dargs="-Dfile.encoding=Cp1252"

That is, the parenthetical class name after the method in the {{-Dtestmethod=...}} string
doesn't work - you have to strip this out in order to actually use the given cmdline.

Am I right in assuming that LUCENE-3762 is the source of this behavior change?
> Upgrade JUnit to 4.10, refactor state-machine of detecting setUp/tearDown call chaining.
> ----------------------------------------------------------------------------------------
>                 Key: LUCENE-3762
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Dawid Weiss
>            Assignee: Dawid Weiss
>            Priority: Trivial
>             Fix For: 3.6, 4.0
>         Attachments: LUCENE-3762-backport.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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message