File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/de/donnerbart/split Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 33import com .fasterxml .jackson .dataformat .xml .XmlMapper ;
44import com .github .javaparser .JavaParser ;
55import com .github .javaparser .ast .body .ClassOrInterfaceDeclaration ;
6+ import com .github .javaparser .ast .expr .AnnotationExpr ;
67import org .jetbrains .annotations .NotNull ;
78import org .jetbrains .annotations .Nullable ;
89import org .slf4j .Logger ;
2728
2829public class TestSplit {
2930
31+ private static final @ NotNull Set <String > SKIP_TEST_ANNOTATIONS =
32+ Set .of ("org.junit.jupiter.api.Disabled" , "Disabled" , "org.junit.Ignore" , "Ignore" );
33+
3034 private static final @ NotNull Logger LOG = LoggerFactory .getLogger (TestSplit .class );
3135
3236 private final int splitIndex ;
@@ -189,7 +193,8 @@ public void run() throws Exception {
189193 final var className = declaration .getFullyQualifiedName ().orElseThrow ();
190194 if (declaration .getAnnotations ()
191195 .stream ()
192- .anyMatch (annotationExpr -> "Disabled" .equals (annotationExpr .getNameAsString ()))) {
196+ .map (AnnotationExpr ::getNameAsString )
197+ .anyMatch (SKIP_TEST_ANNOTATIONS ::contains )) {
193198 LOG .info ("Skipping disabled test {}" , className );
194199 } else {
195200 classNames .add (className );
You can’t perform that action at this time.
0 commit comments