You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by sn...@apache.org on 2026/05/26 20:24:29 UTC

(flink) 02/02: [FLINK-39751][tests] Add `FailsOnJava25`

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

snuyanzin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit b194666f597e1dcb6cbb515d6d636bea29c9ffb9
Author: Sergey Nuyanzin <sn...@gmail.com>
AuthorDate: Mon May 25 13:40:08 2026 +0200

    [FLINK-39751][tests] Add `FailsOnJava25`
    
    This closes #28249.
---
 .../core/security/FlinkSecurityManagerTest.java     |  2 ++
 flink-end-to-end-tests/pom.xml                      |  9 +++++++++
 .../ClusterUncaughtExceptionHandlerITCase.java      |  2 ++
 .../apache/flink/testutils/junit/FailsOnJava25.java | 21 +++++++++++++++++++++
 pom.xml                                             |  4 ++++
 5 files changed, 38 insertions(+)

diff --git a/flink-core/src/test/java/org/apache/flink/core/security/FlinkSecurityManagerTest.java b/flink-core/src/test/java/org/apache/flink/core/security/FlinkSecurityManagerTest.java
index aea6a8f80ae..2d519cf7deb 100644
--- a/flink-core/src/test/java/org/apache/flink/core/security/FlinkSecurityManagerTest.java
+++ b/flink-core/src/test/java/org/apache/flink/core/security/FlinkSecurityManagerTest.java
@@ -27,6 +27,7 @@ import org.apache.flink.testutils.executor.TestExecutorExtension;
 
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
@@ -39,6 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
 /** Tests for {@code FlinkUserSecurityManager}. */
+@Tag("org.apache.flink.testutils.junit.FailsOnJava25")
 class FlinkSecurityManagerTest {
 
     @RegisterExtension
diff --git a/flink-end-to-end-tests/pom.xml b/flink-end-to-end-tests/pom.xml
index 9ff8809eda6..0ba09069f7c 100644
--- a/flink-end-to-end-tests/pom.xml
+++ b/flink-end-to-end-tests/pom.xml
@@ -138,6 +138,15 @@ under the License.
 				<excludeE2E>org.apache.flink.testutils.junit.FailsOnJava17</excludeE2E>
 			</properties>
 		</profile>
+		<profile>
+			<id>java25</id>
+			<activation>
+				<jdk>[25,)</jdk>
+			</activation>
+			<properties>
+				<excludeE2E>org.apache.flink.testutils.junit.FailsOnJava25</excludeE2E>
+			</properties>
+		</profile>
 	</profiles>
 
 	<build>
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/entrypoint/ClusterUncaughtExceptionHandlerITCase.java b/flink-runtime/src/test/java/org/apache/flink/runtime/entrypoint/ClusterUncaughtExceptionHandlerITCase.java
index fb5457a9986..fddfc9bb576 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/entrypoint/ClusterUncaughtExceptionHandlerITCase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/entrypoint/ClusterUncaughtExceptionHandlerITCase.java
@@ -32,6 +32,7 @@ import org.apache.flink.util.TestLoggerExtension;
 import org.apache.flink.util.concurrent.ScheduledExecutor;
 
 import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 
@@ -41,6 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assumptions.assumeThat;
 
 /** Integration test to check exit behaviour for the {@link ClusterUncaughtExceptionHandler}. */
+@Tag("org.apache.flink.testutils.junit.FailsOnJava25")
 @ExtendWith(TestLoggerExtension.class)
 class ClusterUncaughtExceptionHandlerITCase {
 
diff --git a/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/FailsOnJava25.java b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/FailsOnJava25.java
new file mode 100644
index 00000000000..8973cd335ac
--- /dev/null
+++ b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/FailsOnJava25.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.testutils.junit;
+
+/** Marker interface for tests that fail on Java 25. */
+public interface FailsOnJava25 {}
diff --git a/pom.xml b/pom.xml
index 1939995d79f..3543baa3cca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1192,6 +1192,10 @@ under the License.
 				<jdk>[25,)</jdk>
 			</activation>
 
+			<properties>
+				<surefire.excludedGroups.jdk>org.apache.flink.testutils.junit.FailsOnJava25</surefire.excludedGroups.jdk>
+			</properties>
+
 			<build>
 				<pluginManagement>
 					<plugins>