[
https://issues.apache.org/jira/browse/FLINK-25220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jing Ge closed FLINK-25220.
---------------------------
Fix Version/s: 1.15.0
Resolution: Fixed
> Develop the ArchUnit Infra for test code and write an architectural rule for
> all IT cases w.r.t. MiniCluster
> ------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-25220
> URL: https://issues.apache.org/jira/browse/FLINK-25220
> Project: Flink
> Issue Type: Improvement
> Components: Tests
> Reporter: Jing Ge
> Assignee: Jing Ge
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.15.0
>
>
> The original idea of this PR is to build architectural rules for ITCase and
> quickly found that current architecture test submodule only focuses on
> production code. In order to check the architecture violation of test code,
> followings should be done:
> * build the architecture test infra for test code
> * isolate the classpaths of production code and test code, i.e. separation
> of concers.
> * define architectural rules for ITCase
> * create ArchUnit test for some submodules
> The first try was using test jars of submodules and check the architectural
> violation centrally. There are some cons of this solution. First, it will
> need each submodule to create standard test jars that have conflict with some
> submodules who need extra exclusion filter for their test jars. Second,
> production code and test code mixed up, which makes it very difficult to
> define the scope of analyse classes for each rule, because some rules should
> only have effect on production code and others should only be used for test
> code. As second try, a distributed solution will be used. The
> architecture-test module will be split into three submodules: base for
> ArchUnit common extension, production for ArchUnit test of production code,
> test for defining rules for test code centrally. The real ArchUnit tests will
> be distributed and developed within submodules where architectural violation
> check is required.
> Architectural rules are required to verify that all IT cases should have:
> * for JUnit4
> a public, static, final member of type MiniClusterWithClientResource
> annotated with ClassRule.
> or
> a public, non-static, final member of type MiniClusterWithClientResource
> annotated with Rule.
> * for JUnit5
> a public, static, final member of type MiniClusterExtension
> and
> a public, static, final member of type AllCallbackWrapper annotated with
> RegisterExtension
> The inheritance hierarchy need to be checked, because the member of
> MiniCluster could be defined in the super class.
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)