JingGe commented on a change in pull request #18867:
URL: https://github.com/apache/flink/pull/18867#discussion_r811746144



##########
File path: 
flink-architecture-tests/flink-architecture-tests-test/src/main/java/org/apache/flink/architecture/rules/ITCaseRules.java
##########
@@ -98,23 +99,28 @@
     @ArchTest
     public static final ArchRule ITCASE_USE_MINICLUSTER =
             freeze(
-                    javaClassesThat()
-                            .haveSimpleNameEndingWith("ITCase")
-                            .and()
-                            .areTopLevelClasses()
-                            .and()
-                            .doNotHaveModifier(ABSTRACT)
-                            .should(
-                                    fulfill(
-                                            // JUnit 5 violation check
-                                            miniClusterExtensionRule()
-                                                    .and(allCallbackWrapper())
-                                                    // JUnit 4 violation 
check, which should be
-                                                    // removed
-                                                    // after the JUnit 4->5 
migration is closed.
-                                                    // Please refer to 
FLINK-25858.
-                                                    
.or(miniClusterWithClientResourceClassRule())
-                                                    
.or(miniClusterWithClientResourceRule()))));
+                            javaClassesThat()
+                                    .haveSimpleNameEndingWith("ITCase")
+                                    .and()
+                                    .areTopLevelClasses()
+                                    .and()
+                                    .doNotHaveModifier(ABSTRACT)
+                                    .should(
+                                            fulfill(
+                                                    // JUnit 5 violation check
+                                                    miniClusterExtensionRule()
+                                                            
.and(allCallbackWrapper())
+                                                            // JUnit 4 
violation check, which should
+                                                            // be
+                                                            // removed
+                                                            // after the JUnit 
4->5 migration is
+                                                            // closed.
+                                                            // Please refer to 
FLINK-25858.
+                                                            .or(
+                                                                    
miniClusterWithClientResourceClassRule())
+                                                            .or(
+                                                                    
miniClusterWithClientResourceRule()))))
+                    .as("ITCASE tests should define MiniCluster explicitly");

Review comment:
       I was actually struggling to this. If we used the concrete class name, 
the rule key will change anytime when the class name has been refactored.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to