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

Andrew Kyle Purtell commented on HBASE-27050:
---------------------------------------------

Change is trivial:

{noformat}
diff --git a/pom.xml b/pom.xml
index 4a0a9e2a73..f1648a81c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1575,6 +1575,7 @@
           <configuration>
             <groups>${surefire.firstPartGroups}</groups>
             <failIfNoTests>false</failIfNoTests>
+            <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
             <trimStackTrace>false</trimStackTrace>
             <skip>${surefire.skipFirstPart}</skip>
             <forkCount>${surefire.firstPartForkCount}</forkCount>
{noformat}

> Support unit test pattern matching again
> ----------------------------------------
>
>                 Key: HBASE-27050
>                 URL: https://issues.apache.org/jira/browse/HBASE-27050
>             Project: HBase
>          Issue Type: Test
>          Components: test
>    Affects Versions: 2.5.0
>            Reporter: Andrew Kyle Purtell
>            Assignee: Andrew Kyle Purtell
>            Priority: Minor
>             Fix For: 2.5.0, 3.0.0-alpha-3
>
>
> Sometimes we want to run a build with a subset of unit tests to be executed 
> over multiple modules, like:
> {{mvn clean install -DskipITs -Dtest=Test*Encode*}}
> which will execute some tests in common, some in server, etc. but not in 
> checkstyle, which fails
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test
> (default-test) on project hbase-checkstyle:
> No tests matching pattern "Test*Encode*" were executed!
> (Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> [Help 
> 1]
> [ERROR] 
> {noformat}
> We already set {{failIfNoTests}} to false in the surefire configuration. 
> Apparently {{failIfNoSpecifiedTests}} is also necessary to support the above. 
> When {{failIfNoSpecifiedTests}} is specified in the configuration or on the 
> command line, surefire behaves as expected.
> This behavior has changed in branch-2.5 and up. 
> Open to suggestions for other solutions.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to