Skip to content

Commit

Permalink
[FLINK-36009] Create architecture module to test all
Browse files Browse the repository at this point in the history
  • Loading branch information
eskabetxe committed Oct 23, 2024
1 parent d03aa64 commit 99a0e50
Show file tree
Hide file tree
Showing 34 changed files with 242 additions and 397 deletions.

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions flink-connector-jdbc-architecture/archunit-violations/stored.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
#Wed Oct 23 14:35:32 CEST 2024
Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @Public\ must\ be\ annotated\ with\ @Public.=e391ec0f-7ba6-4b7e-8125-cbd364cbedd9
ITCASE\ tests\ should\ use\ a\ MiniCluster\ resource\ or\ extension=f09f3e26-9371-41f4-86a1-cd59b0fe624c
Production\ code\ must\ not\ call\ methods\ annotated\ with\ @VisibleForTesting=3547d327-0923-4fa7-8319-b18102cc22d0
Options\ for\ connectors\ and\ formats\ should\ reside\ in\ a\ consistent\ package\ and\ be\ public\ API.=10da9e19-442f-49fb-b340-a2e401062d33
Tests\ inheriting\ from\ AbstractTestBase\ should\ have\ name\ ending\ with\ ITCase=7d5a32d5-922b-4760-825b-c30427dc987e
Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @PublicEvolving\ must\ be\ annotated\ with\ @Public(Evolving).=47967139-2deb-41b4-91c3-b19e56e5fc76
Classes\ in\ API\ packages\ should\ have\ at\ least\ one\ API\ visibility\ annotation.=b97067ac-f37f-4793-8578-bdbe6d2abf5b
Connector\ production\ code\ must\ depend\ only\ on\ public\ API\ when\ outside\ of\ connector\ packages=afc13e03-aa50-408b-b87e-aa491cf0b8cb
117 changes: 117 additions & 0 deletions flink-connector-jdbc-architecture/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc-parent</artifactId>
<version>3.3-SNAPSHOT</version>
</parent>

<artifactId>flink-connector-jdbc-architecture</artifactId>
<name>Flink : Connectors : JDBC : Architecture</name>

<packaging>jar</packaging>

<dependencies>
<!-- Flink ArchUnit -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-architecture-tests-base</artifactId>
<version>${flink.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-architecture-tests-test</artifactId>
<version>${flink.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-architecture-tests-production</artifactId>
<version>${flink.version}</version>
<scope>test</scope>
</dependency>

<!-- Flink Jdbc Modules To Test -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc-core</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc-cratedb</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc-db2</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc-mysql</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc-oceanbase</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc-oracle</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc-postgres</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc-sqlserver</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-jdbc-trino</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
* limitations under the License.
*/

package org.apache.flink.architecture;
package org.apache.flink.connector.jdbc.architecture;

import org.apache.flink.architecture.ProductionCodeArchitectureBase;
import org.apache.flink.architecture.common.ImportOptions;

import com.tngtech.archunit.core.importer.ImportOption;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
* limitations under the License.
*/

package org.apache.flink.architecture;
package org.apache.flink.connector.jdbc.architecture;

import org.apache.flink.architecture.TestCodeArchitectureTestBase;
import org.apache.flink.architecture.common.ImportOptions;

import com.tngtech.archunit.core.importer.ImportOption;
Expand Down
Loading

0 comments on commit 99a0e50

Please sign in to comment.