lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4146) -Dtests.iters combined with -Dtestmethod never fails?
Date Fri, 15 Jun 2012 06:46:42 GMT


Dawid Weiss commented on LUCENE-4146:

This isn't a bug, Hoss. This is an unfortunate API shortcoming of JUnit that I had to accomodate
somehow. So what happens is that:

1) no two junit tests can have the same "description" (which in realistic terms means no two
junit tests can have an identical method name); this confuses the hell out of all IDE clients
and other clients (like ant, maven, etc.).
2) because of the above (and wanting to have separate tests for repetitions), repeated test
names are created so that they contain a sequential number and a seed (to make then unique).
3) because of the above a method filter no longer works because that exact string doesn't
match the generated pseudo-method name.

A workaround is to add globs around method name as in:
ant test -Dtests.iters=2 -Dtestcase=TestSearch -Dtestmethod=*testFailureBuildfile*

Yeah, I realize this sucks but I have no better ideas for the moment (that would work with
existing JUnit infrastructure).
> -Dtests.iters combined with -Dtestmethod never fails?
> -----------------------------------------------------
>                 Key: LUCENE-4146
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Hoss Man
>         Attachments:, TEST-org.apache.lucene.TestSearch.iters-no-fail.xml,
> a test that is hardcoded to fail will report succes if you run it with -Dtests.iters

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