forked from apache/flink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FLINK-25220][test] ITCase ArchUnit test for files connector
- Loading branch information
Showing
6 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...connectors/flink-connector-files/archunit-violations/9e170923-1a49-45b4-8dc1-1ad7858a2357
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
org.apache.flink.connector.file.sink.BatchExecutionFileSinkITCase does not satisfy: contain any fields that are public, static, and of type MiniClusterExtension and final and contain any fields that are public, static, and of type AllCallbackWrapper and final and annotated with @RegisterExtension or contain any fields that are public, static, and of type MiniClusterWithClientResource and final and annotated with @ClassRule or contain any fields that is of type MiniClusterWithClientResource and public and final and not static and annotated with @Rule | ||
org.apache.flink.connector.file.sink.StreamingExecutionFileSinkITCase does not satisfy: contain any fields that are public, static, and of type MiniClusterExtension and final and contain any fields that are public, static, and of type AllCallbackWrapper and final and annotated with @RegisterExtension or contain any fields that are public, static, and of type MiniClusterWithClientResource and final and annotated with @ClassRule or contain any fields that is of type MiniClusterWithClientResource and public and final and not static and annotated with @Rule | ||
org.apache.flink.connector.file.sink.writer.FileSinkMigrationITCase does not satisfy: contain any fields that are public, static, and of type MiniClusterExtension and final and contain any fields that are public, static, and of type AllCallbackWrapper and final and annotated with @RegisterExtension or contain any fields that are public, static, and of type MiniClusterWithClientResource and final and annotated with @ClassRule or contain any fields that is of type MiniClusterWithClientResource and public and final and not static and annotated with @Rule |
Empty file.
4 changes: 4 additions & 0 deletions
4
flink-connectors/flink-connector-files/archunit-violations/stored.rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# | ||
#Thu Jan 20 17:27:26 CET 2022 | ||
classes\ that\ are\ Java\ classes\ and\ have\ simple\ name\ ending\ with\ 'ITCase'\ and\ are\ top\ level\ classes\ and\ do\ not\ have\ modifier\ ABSTRACT\ should\ contain\ any\ fields\ that\ are\ public,\ static,\ and\ of\ type\ MiniClusterExtension\ and\ final\ and\ contain\ any\ fields\ that\ are\ public,\ static,\ and\ of\ type\ AllCallbackWrapper\ and\ final\ and\ annotated\ with\ @RegisterExtension\ or\ contain\ any\ fields\ that\ are\ public,\ static,\ and\ of\ type\ MiniClusterWithClientResource\ and\ final\ and\ annotated\ with\ @ClassRule\ or\ contain\ any\ fields\ that\ is\ of\ type\ MiniClusterWithClientResource\ and\ public\ and\ final\ and\ not\ static\ and\ annotated\ with\ @Rule=9e170923-1a49-45b4-8dc1-1ad7858a2357 | ||
classes\ that\ are\ Java\ classes\ and\ are\ assignable\ to\ org.apache.flink.test.util.AbstractTestBase\ and\ do\ not\ have\ modifier\ ABSTRACT\ should\ have\ simple\ name\ ending\ with\ 'ITCase'=a2441212-ec8c-494d-9a3f-cc334599c116 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...connector-files/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* 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; | ||
|
||
/** Architecture tests for test code. */ | ||
@AnalyzeClasses( | ||
packages = "org.apache.flink.connector.file", | ||
importOptions = { | ||
ImportOption.OnlyIncludeTests.class, | ||
ImportOptions.ExcludeScalaImportOption.class, | ||
ImportOptions.ExcludeShadedImportOption.class | ||
}) | ||
public class TestCodeArchitectureTest { | ||
|
||
@ArchTest | ||
public static final ArchTests COMMON_TESTS = ArchTests.in(TestCodeArchitectureTestBase.class); | ||
} |
31 changes: 31 additions & 0 deletions
31
flink-connectors/flink-connector-files/src/test/resources/archunit.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
# By default we allow removing existing violations, but fail when new violations are added. | ||
freeze.store.default.allowStoreUpdate=true | ||
|
||
# Enable this if a new (frozen) rule has been added in order to create the initial store and record the existing violations. | ||
#freeze.store.default.allowStoreCreation=true | ||
|
||
# Enable this to add allow new violations to be recorded. | ||
# NOTE: Adding new violations should be avoided when possible. If the rule was correct to flag a new | ||
# violation, please try to avoid creating the violation. If the violation was created due to a | ||
# shortcoming of the rule, file a JIRA issue so the rule can be improved. | ||
#freeze.refreeze=true | ||
|
||
freeze.store.default.path=archunit-violations |