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

xtsong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git

commit 760a41502209ae1c4ae0cb13af3787a8c4ac1e24
Author: sxnan <[email protected]>
AuthorDate: Thu Jan 15 14:29:13 2026 +0800

    [ci] Update CI to test under jdk21
---
 .github/workflows/ci.yml | 20 +++++++++++++++-----
 pom.xml                  | 25 +++++++++++++++++++++++--
 tools/e2e.sh             |  2 ++
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c5b71fbb..f80840fd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -55,7 +55,7 @@ jobs:
       fail-fast: false
       matrix:
         os: [ 'macos-latest', 'ubuntu-latest' ]
-        java-version: ["11", "17"]
+        java-version: ["11", "17", "21"]
     steps:
       - uses: actions/checkout@v4
       - name: Install java
@@ -145,9 +145,19 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        os: [ 'ubuntu-latest' ]
-        java-version: [ "17" ]
-        flink-version: [ "1.20", "2.0", "2.1", "2.2" ]
+        include:
+          - os: 'ubuntu-latest'
+            java-version: "17"
+            flink-version: "1.20"
+          - os: 'ubuntu-latest'
+            java-version: "21"
+            flink-version: "2.0"
+          - os: 'ubuntu-latest'
+            java-version: "21"
+            flink-version: "2.1"
+          - os: 'ubuntu-latest'
+            java-version: "21"
+            flink-version: "2.2"
     steps:
       - uses: actions/checkout@v4
       - name: Install java
@@ -185,7 +195,7 @@ jobs:
       matrix:
         os: [ 'ubuntu-latest' ]
         python-version: [ '3.11' ]
-        java-version: [ '17' ]
+        java-version: [ '21' ]
     steps:
       - uses: actions/checkout@v4
       # Free disk space to ensure Elasticsearch has sufficient space for 
indexing operations
diff --git a/pom.xml b/pom.xml
index 6a80955e..97584bc8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,7 +49,8 @@ under the License.
         <log4j2.version>2.23.1</log4j2.version>
         <slf4j.version>1.7.36</slf4j.version>
         <assertj.version>3.23.1</assertj.version>
-        <mockito.version>5.8.0</mockito.version>
+        <mockito.version>5.14.2</mockito.version>
+        <bytebuddy.version>1.15.4</bytebuddy.version>
         <gpg.useagent>true</gpg.useagent>
         <arguments />
     </properties>
@@ -96,6 +97,12 @@ under the License.
             <version>${mockito.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>net.bytebuddy</groupId>
+            <artifactId>byte-buddy</artifactId>
+            <version>${bytebuddy.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <profiles>
@@ -111,6 +118,17 @@ under the License.
             </properties>
         </profile>
 
+        <profile>
+            <id>java-21</id>
+            <activation>
+                <jdk>[21,)</jdk>
+            </activation>
+            <properties>
+                <!-- Skip spotless for jdk21, as the version of spotless 
plugin doesn't support jdk21. -->
+                <spotless.skip>true</spotless.skip>
+            </properties>
+        </profile>
+
         <profile>
             <id>release</id>
             <activation>
@@ -288,7 +306,10 @@ under the License.
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
-                    
<argLine>--add-opens=java.base/java.util=ALL-UNNAMED</argLine>
+                    <argLine>
+                        --add-opens=java.base/java.util=ALL-UNNAMED
+                        --add-exports=java.base/jdk.internal.vm=ALL-UNNAMED
+                    </argLine>
                 </configuration>
             </plugin>
         </plugins>
diff --git a/tools/e2e.sh b/tools/e2e.sh
index 8e29aa2d..9be84640 100755
--- a/tools/e2e.sh
+++ b/tools/e2e.sh
@@ -146,6 +146,8 @@ fi
 cd "$python_dir"
 uv pip install apache-flink~=${DEFAULT_FLINK_VERSION}.0
 
+export JVM_ARGS="${JVM_ARGS} --add-exports 
java.base/jdk.internal.vm=ALL-UNNAMED"
+
 run_test "Resource Cross-Language end-to-end test in Java" 
"run_resource_cross_language_test_in_java"
 run_test "Resource Cross-Language end-to-end test in Python" 
"run_resource_cross_language_test_in_python"
 run_test "Agent plan compatibility end-to-end test" 
"run_agent_plan_compatibility_test"

Reply via email to