jbliznak opened a new pull request, #3258: URL: https://github.com/apache/maven-surefire/pull/3258
fix for #3176 WMIC is not available in recent Windows versions. The new solution with PowerShell should work for Windows 8 and newer and Windows Server 2012 and newer. The change is deliberately as small as possible, leaving most of the old WMIC handling in place because there is a plan to deprecate this class anyway (#3252). On performance note: executing the check via PowerShell is notably slower than with WMIC (low hundreds of millis vs tens of millis). However, since this check is used only to detect zombie process and only once per tens of seconds, this will hopefully be good enough. Much better and faster implementation could be done via ProcessHandle once the minimal supported Java moves to 9 or later. There is already a work in progress at #3252 for this, after which only combinations with Java 8 and Windows will use PowerShell for doing the check. Until then this should do. Since windows-2022 was hardcoded precisely because of missing WMIC on newer windows, I propose to change the matrix too. I don't think we need to increase number of tested combinations so just replace windows-2022 with windows-latest. CI run with windows-2022 available at https://github.com/jbliznak/maven-surefire/actions/runs/21788605653 CI run with windows-latest https://github.com/jbliznak/maven-surefire/actions/runs/21788596928 --- Following this checklist to help us incorporate your contribution quickly and easily: - [x] Each commit in the pull request should have a meaningful subject line and body. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [x] You have run the integration tests successfully (`mvn -Prun-its clean install`). If your pull request is about ~20 lines of code you don't need to sign an [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure please ask on the developers list. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- 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]
