Caideyipi opened a new pull request, #18676: URL: https://github.com/apache/iotdb/pull/18676
## Summary Fix the per-fork port isolation introduced in #17712 by explicitly passing Surefire's fork number to each forked JVM. EnvironmentUtils.FORK_PORT_OFFSET reads surefire.forkNumber as a system property, but Surefire's placeholder is only interpolated in plugin configuration; it is not automatically exposed as a JVM property. Without this change every fork falls back to fork 1, so a sibling fork binding port 7667 can still make EnvironmentUtils.cleanEnv() fail with "failed to close some ports" in an unrelated test such as RecordUtilTests. The property is added to both the normal and JaCoCo Surefire arg lines. ## Validation - Reproduced the issue with two parallel Surefire forks: both reported a null fork property, selected port 7667, and the checker failed with "failed to close some ports". - With this change, the same probe reported fork properties 1 and 2, selected ports 7667 and 8667, and passed. - Relevant master tests with forkCount=2 and port checks enabled: 8 tests passed. - Spotless check passed. -- 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]
