This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit c67cd4bbee27ec4c366ba337d3d95b8d6c65de67 Author: Andriy Redko <[email protected]> AuthorDate: Wed Oct 23 12:57:30 2024 -0400 JDK-23: Fix cxf-systests-transport-jms, cxf-systests-jaxrs and cxf-rt-rs-mp-client test suites (https://bugs.openjdk.org/browse/JDK-8296244, https://bugs.openjdk.org/browse/JDK-6968351) (cherry picked from commit 3707e9acc9571f742f802924c79608514e092970) (cherry picked from commit c034a259432d4d3b1bd187d56a17ad1796021529) --- .../org/apache/cxf/microprofile/client/AsyncTest.java | 2 ++ rt/transports/jms/pom.xml | 2 +- services/wsn/wsn-core/pom.xml | 2 +- .../apache/cxf/systest/jaxrs/jms/JAXRSJmsTest.java | 5 +++++ systests/transport-jms/pom.xml | 19 +++++++++++++++++++ 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/AsyncTest.java b/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/AsyncTest.java index a4b0243b44..42fd56e2c3 100644 --- a/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/AsyncTest.java +++ b/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/AsyncTest.java @@ -59,6 +59,8 @@ public class AsyncTest { os.write(body.getBytes()); } } + // See please https://bugs.openjdk.org/browse/JDK-6968351 + exchange.getResponseBody().flush(); } } diff --git a/rt/transports/jms/pom.xml b/rt/transports/jms/pom.xml index 9bb6fd2414..8c82fef013 100644 --- a/rt/transports/jms/pom.xml +++ b/rt/transports/jms/pom.xml @@ -191,7 +191,7 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> - <argLine>-Djava.security.manager=allow</argLine> + <argLine>${cxf.surefire.fork.vmargs} -Djava.security.manager=allow</argLine> </configuration> </plugin> </plugins> diff --git a/services/wsn/wsn-core/pom.xml b/services/wsn/wsn-core/pom.xml index 3cf35c4ba9..70498c7923 100644 --- a/services/wsn/wsn-core/pom.xml +++ b/services/wsn/wsn-core/pom.xml @@ -173,7 +173,7 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> - <argLine>-Djava.security.manager=allow</argLine> + <argLine>${cxf.surefire.fork.vmargs} -Djava.security.manager=allow</argLine> </configuration> </plugin> </plugins> diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jms/JAXRSJmsTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jms/JAXRSJmsTest.java index 12b8d9d6b8..1875f85549 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jms/JAXRSJmsTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jms/JAXRSJmsTest.java @@ -72,6 +72,11 @@ public class JAXRSJmsTest extends AbstractBusClientServerTestBase { props.put("java.util.logging.config.file", System.getProperty("java.util.logging.config.file")); + // See please https://bugs.openjdk.org/browse/JDK-8296244 + if (Runtime.version().feature() >= 23) { + props.put("java.security.manager", "allow"); + } + assertTrue("server did not launch correctly", launchServer(EmbeddedJMSBrokerLauncher.class, props, null, false)); assertTrue("server did not launch correctly", diff --git a/systests/transport-jms/pom.xml b/systests/transport-jms/pom.xml index d744e58074..2a94fbb4eb 100644 --- a/systests/transport-jms/pom.xml +++ b/systests/transport-jms/pom.xml @@ -264,4 +264,23 @@ <scope>test</scope> </dependency> </dependencies> + <profiles> + <profile> + <id>jdk23</id> + <activation> + <jdk>[23,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <argLine>${cxf.surefire.fork.vmargs} -Djava.security.manager=allow</argLine> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project>
