Yunyung opened a new pull request, #3997:
URL: https://github.com/apache/ambari/pull/3997

   ## What changes were proposed in this pull request?
   
   The precommit test `mvn clean -am test -pl ambari-server -DskipSurefireTests 
-Dmaven.test.failure.ignore -Dmaven.artifact.threads=10 -Drat.skip 
-Dcheckstyle.skip -DskipAdminWebTests=true` is supposed to skip Java tests but 
doesn't.
   
   - Fix the `ambari-utility/pom.xml` to skip java tests if 
`-DskipSurefireTests` is set.
   
   ## How was this patch tested?
   Verify that Java tests are correctly skipped if -DskipSurefireTests is set.
   
   Command:
   `mvn clean -am test -pl ambari-server -DskipSurefireTests 
-Dmaven.test.failure.ignore -Dmaven.artifact.threads=10 -Drat.skip 
-Dcheckstyle.skip -DskipAdminWebTests=true` 
   
   #### Before:
   One of the maven-surefire-plugin:
   `ambari-utility`:
   ```
   [INFO] --- maven-surefire-plugin:3.2.5:test (default-test) @ ambari-utility 
---
   [INFO] Using auto detected provider 
org.apache.maven.surefire.junit4.JUnit4Provider
   [INFO] 
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running org.apache.ambari.swagger.AmbariSwaggerReaderTest
   [INFO] Running 
org.apache.ambari.checkstyle.AvoidTransactionalOnPrivateMethodsCheckTest
   [INFO] Running 
org.apache.ambari.checkstyle.UndocumentedRestApiOperationCheckTest
   [WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 
0.046 s -- in org.apache.ambari.checkstyle.UndocumentedRestApiOperationCheckTest
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.158 
s -- in org.apache.ambari.checkstyle.AvoidTransactionalOnPrivateMethodsCheckTest
   [ERROR] Tests run: 8, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 
0.958 s <<< FAILURE! -- in org.apache.ambari.swagger.AmbariSwaggerReaderTest
   [ERROR] org.apache.ambari.swagger.AmbariSwaggerReaderTest.swaggerBasicCase 
-- Time elapsed: 0.246 s <<< ERROR!
   java.lang.NoClassDefFoundError: com/sun/jersey/api/core/InjectParam
   ```
   
   #### After:
   `ambari-utility`:
   ```
   [INFO] --- maven-surefire-plugin:3.2.5:test (default-test) @ ambari-utility 
---
   [INFO] Tests are skipped.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ambari.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ambari.apache.org
For additional commands, e-mail: dev-h...@ambari.apache.org

Reply via email to