You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2023/06/15 15:24:19 UTC

[flink] branch master updated: [FLINK-32338][build] Add FailsOnJava17 annotation

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

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


The following commit(s) were added to refs/heads/master by this push:
     new d2e4490ca11 [FLINK-32338][build] Add FailsOnJava17 annotation
d2e4490ca11 is described below

commit d2e4490ca11443de071869877319f459e43821e5
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Thu Jun 15 17:24:07 2023 +0200

    [FLINK-32338][build] Add FailsOnJava17 annotation
---
 .../tests/util/hbase/SQLClientHBaseITCase.java      |  3 ++-
 flink-end-to-end-tests/pom.xml                      |  9 +++++++++
 .../apache/flink/testutils/junit/FailsOnJava17.java | 21 +++++++++++++++++++++
 pom.xml                                             | 21 +++++++++++++++++++++
 4 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/flink-end-to-end-tests/flink-end-to-end-tests-hbase/src/test/java/org/apache/flink/tests/util/hbase/SQLClientHBaseITCase.java b/flink-end-to-end-tests/flink-end-to-end-tests-hbase/src/test/java/org/apache/flink/tests/util/hbase/SQLClientHBaseITCase.java
index edc265505a3..aaf15798c53 100644
--- a/flink-end-to-end-tests/flink-end-to-end-tests-hbase/src/test/java/org/apache/flink/tests/util/hbase/SQLClientHBaseITCase.java
+++ b/flink-end-to-end-tests/flink-end-to-end-tests-hbase/src/test/java/org/apache/flink/tests/util/hbase/SQLClientHBaseITCase.java
@@ -27,6 +27,7 @@ import org.apache.flink.tests.util.flink.FlinkResource;
 import org.apache.flink.tests.util.flink.FlinkResourceSetup;
 import org.apache.flink.tests.util.flink.LocalStandaloneFlinkResourceFactory;
 import org.apache.flink.testutils.junit.FailsOnJava11;
+import org.apache.flink.testutils.junit.FailsOnJava17;
 import org.apache.flink.util.FileUtils;
 import org.apache.flink.util.TestLogger;
 
@@ -66,7 +67,7 @@ import static org.junit.Assert.assertThat;
 
 /** End-to-end test for the HBase connectors. */
 @RunWith(Parameterized.class)
-@Category(value = {FailsOnJava11.class})
+@Category(value = {FailsOnJava11.class, FailsOnJava17.class})
 @Ignore("FLINK-21519")
 public class SQLClientHBaseITCase extends TestLogger {
 
diff --git a/flink-end-to-end-tests/pom.xml b/flink-end-to-end-tests/pom.xml
index 8431e2b163b..19f4138be35 100644
--- a/flink-end-to-end-tests/pom.xml
+++ b/flink-end-to-end-tests/pom.xml
@@ -137,6 +137,15 @@ under the License.
 				<excludeE2E>org.apache.flink.testutils.junit.FailsOnJava11</excludeE2E>
 			</properties>
 		</profile>
+		<profile>
+			<id>java17</id>
+			<activation>
+				<jdk>[17,)</jdk>
+			</activation>
+			<properties>
+				<excludeE2E>org.apache.flink.testutils.junit.FailsOnJava17</excludeE2E>
+			</properties>
+		</profile>
 	</profiles>
 
 	<build>
diff --git a/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/FailsOnJava17.java b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/FailsOnJava17.java
new file mode 100644
index 00000000000..7bde208ae74
--- /dev/null
+++ b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/FailsOnJava17.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 17. */
+public interface FailsOnJava17 {}
diff --git a/pom.xml b/pom.xml
index f818c5a02d8..fc945fc09b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1068,6 +1068,27 @@ under the License.
 			</build>
 		</profile>
 
+		<profile>
+			<id>java17</id>
+			<activation>
+				<jdk>[17,)</jdk>
+			</activation>
+
+			<build>
+				<pluginManagement>
+					<plugins>
+						<plugin>
+							<groupId>org.apache.maven.plugins</groupId>
+							<artifactId>maven-surefire-plugin</artifactId>
+							<configuration>
+								<excludedGroups>org.apache.flink.testutils.junit.FailsOnJava17</excludedGroups>
+							</configuration>
+						</plugin>
+					</plugins>
+				</pluginManagement>
+			</build>
+		</profile>
+
 		<profile>
 			<id>java17-target</id>
 			<build>