This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 4.0.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit c034a259432d4d3b1bd187d56a17ad1796021529
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)
---
 .../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 548cf0b2c7..0e5a56bed1 100644
--- a/rt/transports/jms/pom.xml
+++ b/rt/transports/jms/pom.xml
@@ -180,7 +180,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 8df99dab51..41ba12a65b 100644
--- a/services/wsn/wsn-core/pom.xml
+++ b/services/wsn/wsn-core/pom.xml
@@ -175,7 +175,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 2d52a4cce7..e458987ade 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 f994d12a9f..14f693b5c2 100644
--- a/systests/transport-jms/pom.xml
+++ b/systests/transport-jms/pom.xml
@@ -268,4 +268,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>

Reply via email to