This submodule contains rules defined centrally for test code architectural tests that will be developed in each submodule individually where the test code has been developed.
Compared to flink-architecture-tests-production which implements and executes architectural rules centrally, flink-architecture-tests-test implements the rules centrally, but they are executed individually in each submodule. This is done for the following reasons:
flink-architecture-tests-test centrally, but also develop further module-specific architectural tests locally.Please refer to README.
If there already exists any architectural test in the Flink submodule, you can skip this section and start writing your architectural tests and rules.
It is recommended to stick to the following template to setup and develop the first test code architectural test for a Flink submodule.
Under a Flink submodule where no architectural test has ever been developed.
archunit.properties and flink-connector-file under “ /src/test/resources”. Please use archunit.properties and log4j2-test.properties as template.org.apache.flink.architecture. It is recommended to use TestCodeArchitectureTest as the class name.@ArchTest public static final ArchTests COMMON_TESTS = ArchTests.in(TestCodeArchitectureTestBase.class) .org.apache.flink.architecture.rules if it is required.For practice purpose, please refer to the flink-connector-file as the reference implementation.
Please refer to README.
Please refer to README.
In that case, you need to regenerate all the stores. Just run this on the root of the project:
rm -rf `find . -type d -name archunit-violations` mvn test -Dtest="*TestCodeArchitectureTest*" -DfailIfNoTests=false -Darchunit.freeze.refreeze=true -Darchunit.freeze.store.default.allowStoreCreation=true -Dfast