You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/04/27 20:53:57 UTC

[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #288: [SUREFIRE-1783] Fork JVM defined by Toolchain should not inherit JAVA_HOME from Maven process

Tibor17 commented on a change in pull request #288:
URL: https://github.com/apache/maven-surefire/pull/288#discussion_r416140830



##########
File path: maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoToolchainsTest.java
##########
@@ -47,7 +49,7 @@
  * Test for {@link AbstractSurefireMojo}. jdkToolchain parameter
  */
 @RunWith( PowerMockRunner.class )
-@PrepareForTest( {AbstractSurefireMojo.class} )
+@PrepareForTest( {AbstractSurefireMojo.class, DefaultJavaToolChain.class} )

Review comment:
       for your info, the annotation `PrepareForTest` is used with a class which is mocked using the method `mockStatic`. This does not happen in your new test method `shouldChangeJavaHomeFromToolchain`.




----------------------------------------------------------------
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.

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