You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jonathan Hsieh (JIRA)" <ji...@codehaus.org> on 2011/09/06 02:30:32 UTC

[jira] Commented: (SUREFIRE-766) Regression in excludes feature between surefire 2.6 and 2.7.

    [ https://jira.codehaus.org/browse/SUREFIRE-766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=277831#comment-277831 ] 

Jonathan Hsieh commented on SUREFIRE-766:
-----------------------------------------

Notice that I exclude **/Test*.java, yet TestFlumeShell runs.
{code}
Version 2.8.1 based build.
jon@grimlock:~/proj/cdh-flume$ mvn test -Dtest.exclude.pattern="**/TestA*.java,**/TestF*.java"
...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running dk.brics.automaton.TestAutomaton
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.089 sec
Running com.cloudera.flume.shell.TestFlumeShell
...
{code}


Notice that initially we start testing with TestConsistentHash
{code}
Version 2.6 based build.
jon@grimlock:~/proj/cdh-flume$ mvn test
...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.cloudera.util.consistenthash.TestConsistentHash
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.288 sec
Running com.cloudera.flume.master.TestMasterReport
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.487 sec
Running com.cloudera.flume.agent.diskfailover.TestConcurrentDFOMan
Tests run: 11, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 17.853 sec
Running com.cloudera.util.TestNetUtils
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.959 sec
Running com.cloudera.flume.agent.TestEndToEndAckFailureRecovery
^CDestroying 1 processes
Destroying process..
Destroyed 1 processes
{code}

Now we exclue TestC* and TestM* -- we have excluded thos tests and started with TestEndToEndAckFailureRecovery.
{code}
jon@grimlock:~/proj/cdh-flume$ mvn test -Dtest.exclude.pattern=**/TestC*.java,**/TestM*.java
...
Running com.cloudera.util.TestNetUtils
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.65 sec
Running com.cloudera.flume.agent.TestEndToEndAckFailureRecovery
^CDestroying 1 processes
{code}

> Regression in excludes feature between surefire 2.6 and 2.7.
> ------------------------------------------------------------
>
>                 Key: SUREFIRE-766
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-766
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.x support
>    Affects Versions: 2.7, 2.7.1, 2.7.2, 2.8, 2.8.1, 2.9
>            Reporter: Jonathan Hsieh
>
> I have a build that excludes certain JUnit 4 test cases by allowing users to specify a -Dtest.exclude.pattern=**/TestA*.java,**/TestB*.java style command line argument.  This worked for surefire 2.5, 2.6 but fails to work in 2.7, 2.7.1, 2.7.2, 2.8, 2.8.1, and 2.9 releases.  
> Here's how I pass in the excludes from the command line:
> {code}
> ...
> <plugins> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <forkMode>always</forkMode>
>           <includes>
>             <include>**/Test*.java</include>
>           </includes>
>           <excludes>
>             <exclude>**/*$*</exclude>
>             <exclude>${test.exclude.pattern}</exclude>
>           </excludes>
> ...
> {code}
> and 
> {code}
> ...
> <properties>
>    ...
>    <!-- For flaky tests exclusion -->
>     <test.exclude />
>     <test.exclude.pattern>**/${test.exclude}.java</test.exclude.pattern>
>   </properties>
> ...
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira