It semms caching ONLY occurs when using @AnalyzeClasses and @ArchTest annotated static fields or methods.
After transforming my tests to this pattern, performance skyrockets to 0.05 seconds!
@AnalyzeClasses(packages = "some.svc.gui.impl")
public class StandardCodeModuleTest extends StandardCodeTest {
@ArchTest
public static final ArchRule ENFORCE_EXCEPTION_NAMES = classes()
.that()
.areAssignableTo(Exception.class)
.and(modifier(PUBLIC))
.and().areNotAnnotatedWith("some.qa.ExceptionNameFlaw")
.should()
.haveNameMatching(".*Exception").orShould()
.haveNameMatching(".*Error");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…