jbliznak commented on code in PR #3258:
URL: https://github.com/apache/maven-surefire/pull/3258#discussion_r2779125400


##########
surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java:
##########
@@ -365,15 +365,15 @@ public void shouldParseBusyboxHoursEtime() {
     }
 
     @Test
-    public void shouldHaveSystemPathToWmicOnWindows() throws Exception {
+    public void shouldHaveSystemPathToPowerShellOnWindows() throws Exception {
         assumeTrue(IS_OS_WINDOWS);
         assumeThat(System.getenv("SystemRoot"), is(notNullValue()));
         assumeThat(System.getenv("SystemRoot"), is(not("")));
-        assumeTrue(new File(System.getenv("SystemRoot"), 
"System32\\Wbem").isDirectory());
-        assumeTrue(new File(System.getenv("SystemRoot"), 
"System32\\Wbem\\wmic.exe").isFile());
-        assertThat((Boolean) invokeMethod(PpidChecker.class, 
"hasWmicStandardSystemPath"))
+        assumeTrue(new File(System.getenv("SystemRoot"), 
"System32\\WindowsPowerShell\\v1.0").isDirectory());

Review Comment:
   BTW the implementation should work even if powershell is in different 
location - the same way the WMIC was able to be used from elsewhere if it was 
found on the PATH. It just prefer this standard location to be used first.
   
   The test itself also doesn't fail if the location is not available but other 
tests will fail if no powershell is found, again the same as with previous WMIC 
implementation.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to