This is an automated email from the ASF dual-hosted git repository. martijnvisser pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/flink-connector-elasticsearch.git
commit 85e02e019b04697746e7ae10e342d31261522ecc Author: Jing Ge <[email protected]> AuthorDate: Wed Apr 6 17:19:02 2022 +0200 [FLINK-27061][ES6] ArchUnit test for production code --- .../07e22212-0fdc-435a-9a8b-aca438213316 | 0 .../3010cd85-0143-4cff-9095-1f24a1979f7f | 0 .../795761fe-68cf-40d9-8ed8-bc6f47cb2292 | 0 .../82e2a33f-9c4b-49ed-95d5-2319a9ae5e1f | 0 .../a4b5cf92-8e7d-43af-9d55-c693e352a3bc | 0 .../archunit-violations/stored.rules | 7 +++- .../ProductionCodeArchitectureTest.java | 41 ++++++++++++++++++++++ 7 files changed, 47 insertions(+), 1 deletion(-) diff --git a/flink-connector-elasticsearch6/archunit-violations/07e22212-0fdc-435a-9a8b-aca438213316 b/flink-connector-elasticsearch6/archunit-violations/07e22212-0fdc-435a-9a8b-aca438213316 new file mode 100644 index 0000000..e69de29 diff --git a/flink-connector-elasticsearch6/archunit-violations/3010cd85-0143-4cff-9095-1f24a1979f7f b/flink-connector-elasticsearch6/archunit-violations/3010cd85-0143-4cff-9095-1f24a1979f7f new file mode 100644 index 0000000..e69de29 diff --git a/flink-connector-elasticsearch6/archunit-violations/795761fe-68cf-40d9-8ed8-bc6f47cb2292 b/flink-connector-elasticsearch6/archunit-violations/795761fe-68cf-40d9-8ed8-bc6f47cb2292 new file mode 100644 index 0000000..e69de29 diff --git a/flink-connector-elasticsearch6/archunit-violations/82e2a33f-9c4b-49ed-95d5-2319a9ae5e1f b/flink-connector-elasticsearch6/archunit-violations/82e2a33f-9c4b-49ed-95d5-2319a9ae5e1f new file mode 100644 index 0000000..e69de29 diff --git a/flink-connector-elasticsearch6/archunit-violations/a4b5cf92-8e7d-43af-9d55-c693e352a3bc b/flink-connector-elasticsearch6/archunit-violations/a4b5cf92-8e7d-43af-9d55-c693e352a3bc new file mode 100644 index 0000000..e69de29 diff --git a/flink-connector-elasticsearch6/archunit-violations/stored.rules b/flink-connector-elasticsearch6/archunit-violations/stored.rules index 10c711f..f55e96b 100644 --- a/flink-connector-elasticsearch6/archunit-violations/stored.rules +++ b/flink-connector-elasticsearch6/archunit-violations/stored.rules @@ -1,4 +1,9 @@ # -#Tue Feb 22 12:17:08 CET 2022 +#Wed Apr 06 17:07:17 CEST 2022 +Options\ for\ connectors\ and\ formats\ should\ reside\ in\ a\ consistent\ package\ and\ be\ public\ API.=795761fe-68cf-40d9-8ed8-bc6f47cb2292 +Production\ code\ must\ not\ call\ methods\ annotated\ with\ @VisibleForTesting=a4b5cf92-8e7d-43af-9d55-c693e352a3bc Tests\ inheriting\ from\ AbstractTestBase\ should\ have\ name\ ending\ with\ ITCase=25e52d29-fa7e-42fa-a571-b5c76235df52 +Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @PublicEvolving\ must\ be\ annotated\ with\ @Public(Evolving).=3010cd85-0143-4cff-9095-1f24a1979f7f +Classes\ in\ API\ packages\ should\ have\ at\ least\ one\ API\ visibility\ annotation.=07e22212-0fdc-435a-9a8b-aca438213316 ITCASE\ tests\ should\ use\ a\ MiniCluster\ resource\ or\ extension=db3972e4-f3a3-45b2-9643-27cba0cef09d +Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @Public\ must\ be\ annotated\ with\ @Public.=82e2a33f-9c4b-49ed-95d5-2319a9ae5e1f diff --git a/flink-connector-elasticsearch6/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java b/flink-connector-elasticsearch6/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java new file mode 100644 index 0000000..5b9811c --- /dev/null +++ b/flink-connector-elasticsearch6/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java @@ -0,0 +1,41 @@ +/* + * 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.architecture; + +import org.apache.flink.architecture.common.ImportOptions; + +import com.tngtech.archunit.core.importer.ImportOption; +import com.tngtech.archunit.junit.AnalyzeClasses; +import com.tngtech.archunit.junit.ArchTest; +import com.tngtech.archunit.junit.ArchTests; + +/** product code Architecture tests. */ +@AnalyzeClasses( + packages = "org.apache.flink.connector", + importOptions = { + ImportOption.DoNotIncludeTests.class, + ImportOption.DoNotIncludeArchives.class, + ImportOptions.ExcludeScalaImportOption.class, + ImportOptions.ExcludeShadedImportOption.class + }) +public class ProductionCodeArchitectureTest { + + @ArchTest + public static final ArchTests COMMON_TESTS = ArchTests.in(ProductionCodeArchitectureBase.class); +}
