This is an automated email from the ASF dual-hosted git repository. jungm pushed a commit to branch ee11 in repository https://gitbox.apache.org/repos/asf/tomee-tck.git
commit 8944c03bc38ce55b472eb55f65f6500dc7656d45 Author: Markus Jung <[email protected]> AuthorDate: Sun Jul 19 16:29:27 2026 +0200 Make the invoker reactors' HTTP pin movable and fail fast on busy ports The authentication and faces tomee-remote-profile.xml resolve their tomee.httpPort pin from tomee.http.port at profile-inject time, so the shell-selected port reaches the downloaded reactors, and both poms assert the chosen port free right before the invoker runs. The security reactor pins 8080/8443/8005/33389 across config, DB seeds, and compile-time constants, so its pom asserts that fixed set free instead of relocating. --- runner-standalone/authentication/pom.xml | 21 ++++++++++++++ .../src/test/resources/tomee-remote-profile.xml | 2 +- runner-standalone/faces/pom.xml | 21 ++++++++++++++ .../src/test/resources/tomee-remote-profile.xml | 2 +- runner-standalone/security/pom.xml | 32 ++++++++++++++++++++++ 5 files changed, 76 insertions(+), 2 deletions(-) diff --git a/runner-standalone/authentication/pom.xml b/runner-standalone/authentication/pom.xml index a70fd80..c2e155b 100644 --- a/runner-standalone/authentication/pom.xml +++ b/runner-standalone/authentication/pom.xml @@ -125,6 +125,27 @@ <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> + <!-- Assert the sole bound host port free immediately before the + reactor runs: each invoker sub-build starts its own + arquillian-tomee-remote TomEE on this port, and the adapter + silently attaches to any server already answering there, so a + foreign listener would make the suite look green without ever + exercising the TomEE under test. Declared first so it runs + before install-tck-parent within pre-integration-test, and in + any case before the invoker at integration-test. --> + <execution> + <id>require-free-tomee-ports</id> + <phase>pre-integration-test</phase> + <goals><goal>exec</goal></goals> + <configuration> + <skip>${tck.standalone.skip}</skip> + <executable>sh</executable> + <arguments> + <argument>${maven.multiModuleProjectDirectory}/environment/tomee/require-tomee-ports-free.sh</argument> + <argument>${tomee.http.port}</argument> + </arguments> + </configuration> + </execution> <execution> <id>install-tck-parent</id> <phase>pre-integration-test</phase> diff --git a/runner-standalone/authentication/src/test/resources/tomee-remote-profile.xml b/runner-standalone/authentication/src/test/resources/tomee-remote-profile.xml index 7b59965..aacb1b1 100644 --- a/runner-standalone/authentication/src/test/resources/tomee-remote-profile.xml +++ b/runner-standalone/authentication/src/test/resources/tomee-remote-profile.xml @@ -77,7 +77,7 @@ <configuration> <systemPropertyVariables> <tomee.stopPort>-1</tomee.stopPort> - <tomee.httpPort>8080</tomee.httpPort> + <tomee.httpPort>${tomee.http.port}</tomee.httpPort> <tomee.ajpPort>-1</tomee.ajpPort> <tomee.dir>target/tomee/server</tomee.dir> <tomee.appWorkingDir>target/tomee/arquillian</tomee.appWorkingDir> diff --git a/runner-standalone/faces/pom.xml b/runner-standalone/faces/pom.xml index 47be7dd..2becd34 100644 --- a/runner-standalone/faces/pom.xml +++ b/runner-standalone/faces/pom.xml @@ -95,6 +95,27 @@ <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> + <!-- Assert the sole bound host port free immediately before the + reactor runs: each invoker sub-build starts its own + arquillian-tomee-remote TomEE on this port, and the adapter + silently attaches to any server already answering there, so a + foreign listener would make the suite look green without ever + exercising the TomEE under test. Declared first so it runs + before install-tck-parent within pre-integration-test, and in + any case before the invoker at integration-test. --> + <execution> + <id>require-free-tomee-ports</id> + <phase>pre-integration-test</phase> + <goals><goal>exec</goal></goals> + <configuration> + <skip>${tck.standalone.skip}</skip> + <executable>sh</executable> + <arguments> + <argument>${maven.multiModuleProjectDirectory}/environment/tomee/require-tomee-ports-free.sh</argument> + <argument>${tomee.http.port}</argument> + </arguments> + </configuration> + </execution> <execution> <id>install-tck-parent</id> <phase>pre-integration-test</phase> diff --git a/runner-standalone/faces/src/test/resources/tomee-remote-profile.xml b/runner-standalone/faces/src/test/resources/tomee-remote-profile.xml index e4a1e69..7be3c05 100644 --- a/runner-standalone/faces/src/test/resources/tomee-remote-profile.xml +++ b/runner-standalone/faces/src/test/resources/tomee-remote-profile.xml @@ -68,7 +68,7 @@ <configuration> <systemPropertyVariables> <tomee.stopPort>-1</tomee.stopPort> - <tomee.httpPort>8080</tomee.httpPort> + <tomee.httpPort>${tomee.http.port}</tomee.httpPort> <tomee.ajpPort>-1</tomee.ajpPort> <tomee.dir>target/tomee/server</tomee.dir> <tomee.appWorkingDir>target/tomee/arquillian</tomee.appWorkingDir> diff --git a/runner-standalone/security/pom.xml b/runner-standalone/security/pom.xml index fed7906..62d94a0 100644 --- a/runner-standalone/security/pom.xml +++ b/runner-standalone/security/pom.xml @@ -127,6 +127,38 @@ <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> + <!-- Assert the fixed port set free immediately before the reactor + runs. The downloaded Security TCK pins these ports in places no + -D reaches: 8080 is baked into app-openid's + openid-configuration.json endpoints and the app-openid2/3 + client-callback DB seeds (moving tomee.httpPort alone would + break the OIDC flows), the provider Tomcat's server.xml pins + 8443/8005 and ProtectedServlet's providerURI is a compile-time + 8443 constant, and the in-process UnboundID LDAP listener is + hardcoded to 33389. Because the adapter silently attaches to any + server already answering, the branch asserts this fixed set free + and refuses fast rather than relocating. (tomee.stopPort, + tomee.ajpPort and httpsPort are -1 in tomee-remote-profile.xml + and self-randomize via the adapter; they need no assertion.) + Declared first so it runs before install-tck-parent within + pre-integration-test, and in any case before the invoker at + integration-test. --> + <execution> + <id>require-free-tomee-ports</id> + <phase>pre-integration-test</phase> + <goals><goal>exec</goal></goals> + <configuration> + <skip>${tck.standalone.skip}</skip> + <executable>sh</executable> + <arguments> + <argument>${maven.multiModuleProjectDirectory}/environment/tomee/require-tomee-ports-free.sh</argument> + <argument>8080</argument> + <argument>8443</argument> + <argument>8005</argument> + <argument>33389</argument> + </arguments> + </configuration> + </execution> <execution> <id>install-tck-parent</id> <phase>pre-integration-test</phase>
