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

absurdfarce pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-java-driver.git


The following commit(s) were added to refs/heads/trunk by this push:
     new ca6bbbe9e CASSJAVA-115: Java 25 support patch by Jane He; reviewed by 
Bret McGuire
ca6bbbe9e is described below

commit ca6bbbe9e49dc4e5dd907077c1398b64887e62f6
Author: Jane He <[email protected]>
AuthorDate: Mon Sep 7 10:42:40 2026 -0700

    CASSJAVA-115: Java 25 support
    patch by Jane He; reviewed by Bret McGuire
---
 Jenkinsfile-datastax                                 | 10 ++++++++--
 .../api/core/cql/continuous/ContinuousPagingIT.java  | 20 +++++++++++++++++---
 pom.xml                                              | 19 ++++++++++++++++---
 3 files changed, 41 insertions(+), 8 deletions(-)

diff --git a/Jenkinsfile-datastax b/Jenkinsfile-datastax
index 602f33101..a21f98612 100644
--- a/Jenkinsfile-datastax
+++ b/Jenkinsfile-datastax
@@ -332,7 +332,8 @@ pipeline {
                 '1.8',           // Oracle JDK version 1.8 (current default)
                 '[email protected]',  // OpenJDK version 11
                 '[email protected]',  // OpenJDK version 17
-                '[email protected]'   // OpenJDK version 21
+                '[email protected]',   // OpenJDK version 21
+                '[email protected]'   // OpenJDK version 25
                 ],
       description: '''JDK version to use for <b>TESTING</b> when running adhoc 
<b>BUILD-AND-EXECUTE-TESTS</b> builds. <i>All builds will use JDK8 for building 
the driver</i>
                       <table style="width:100%">
@@ -358,6 +359,10 @@ pipeline {
                           <td><strong>[email protected]</strong></td>
                           <td>OpenJDK version 21</td>
                         </tr>
+                        <tr>
+                          <td><strong>[email protected]</strong></td>
+                          <td>OpenJDK version 25</td>
+                        </tr>
                       </table>''')
     booleanParam(
       name: 'SKIP_SERIAL_ITS',
@@ -442,7 +447,8 @@ pipeline {
             values '1.8',           // jdk8
                    '[email protected]',  // jdk11
                    '[email protected]',  // jdk17
-                   '[email protected]'   // jdk21
+                   '[email protected]',   // jdk21
+                   '[email protected]'   // jdk25
           }
         }
 
diff --git 
a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingIT.java
 
b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingIT.java
index 45cc84f07..9eeca8caa 100644
--- 
a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingIT.java
+++ 
b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingIT.java
@@ -391,9 +391,23 @@ public class ContinuousPagingIT extends 
ContinuousPagingITBase {
       CompletableFutures.getUninterruptibly(fetchNextPageFuture);
       fail("Expected an execution exception since paging was cancelled.");
     } catch (CancellationException e) {
-      assertThat(e)
-          .hasMessageContaining("Can't get more results")
-          .hasMessageContaining("query was cancelled");
+        /**
+         * Since Java 25 has a breaking change in CompletableFuture.get()
+         * See: 
https://github.com/openjdk/jdk/commit/8a4315f833f3700075d65fae6bc566011c837c07
+         * CancellationException will be wrapped in a new 
CancellationException, with "get" as the message,
+         * and the original CancellationException as the cause
+         */
+
+        boolean exceptionHasBothMessages = e.getMessage() != null
+                && e.getMessage().contains("Can't get more results")
+                && e.getMessage().contains("query was cancelled");
+
+        boolean causeHasBothMessages = e.getCause() != null
+                && e.getCause().getMessage() != null
+                && e.getCause().getMessage().contains("Can't get more results")
+                && e.getCause().getMessage().contains("query was cancelled");
+
+        assertThat(exceptionHasBothMessages || causeHasBothMessages).isTrue();
     }
     int i = 0;
     for (Row row : pagingResult.currentPage()) {
diff --git a/pom.xml b/pom.xml
index 947132f9a..ad5eeb2de 100644
--- a/pom.xml
+++ b/pom.xml
@@ -445,12 +445,12 @@
       <dependency>
         <groupId>io.projectreactor.tools</groupId>
         <artifactId>blockhound</artifactId>
-        <version>1.0.8.RELEASE</version>
+        <version>1.0.16.RELEASE</version>
       </dependency>
       <dependency>
         <groupId>io.projectreactor.tools</groupId>
         <artifactId>blockhound-junit-platform</artifactId>
-        <version>1.0.8.RELEASE</version>
+        <version>1.0.16.RELEASE</version>
       </dependency>
     </dependencies>
   </dependencyManagement>
@@ -545,7 +545,7 @@
         <plugin>
           <groupId>org.jacoco</groupId>
           <artifactId>jacoco-maven-plugin</artifactId>
-          <version>0.8.10</version>
+          <version>0.8.14</version>
         </plugin>
         <plugin>
           <groupId>org.apache.felix</groupId>
@@ -1068,6 +1068,19 @@ limitations under the License.]]></inlineHeader>
         
<mockitoopens.argline>--add-opens=java.base/jdk.internal.util.random=ALL-UNNAMED</mockitoopens.argline>
       </properties>
     </profile>
+    <profile>
+      <!-- workarounds for running tests with JDK21 -->
+      <id>test-jdk-25</id>
+      <activation>
+        <jdk>[25,)</jdk>
+      </activation>
+      <properties>
+        <!-- for DriverBlockHoundIntegrationIT when using JDK 13+, see 
https://github.com/reactor/BlockHound/issues/33 -->
+        
<blockhound.argline>-XX:+AllowRedefinitionToAddDeleteMethods</blockhound.argline>
+        <!-- allow deep reflection for mockito when using JDK 17+, see 
https://stackoverflow.com/questions/70993863/mockito-can-not-mock-random-in-java-17
 -->
+        
<mockitoopens.argline>--add-opens=java.base/jdk.internal.util.random=ALL-UNNAMED</mockitoopens.argline>
+      </properties>
+    </profile>
   </profiles>
   <licenses>
     <license>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to