You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dawid Weiss (JIRA)" <ji...@apache.org> on 2012/06/15 08:46:42 UTC

[jira] [Commented] (LUCENE-4146) -Dtests.iters combined with -Dtestmethod never fails?

    [ https://issues.apache.org/jira/browse/LUCENE-4146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295485#comment-13295485 ] 

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:
{noformat}
ant test -Dtests.iters=2 -Dtestcase=TestSearch -Dtestmethod=*testFailureBuildfile*
{noformat}

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: https://issues.apache.org/jira/browse/LUCENE-4146
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Hoss Man
>         Attachments: LUCENE-4146.fail.patch, TEST-org.apache.lucene.TestSearch.iters-no-fail.xml, TEST-org.apache.lucene.TestSearch.no-iters-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: 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