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 3
3
import com .fasterxml .jackson .dataformat .xml .XmlMapper ;
4
4
import com .github .javaparser .JavaParser ;
5
5
import com .github .javaparser .ast .body .ClassOrInterfaceDeclaration ;
6
+ import com .github .javaparser .ast .expr .AnnotationExpr ;
6
7
import org .jetbrains .annotations .NotNull ;
7
8
import org .jetbrains .annotations .Nullable ;
8
9
import org .slf4j .Logger ;
27
28
28
29
public class TestSplit {
29
30
31
+ private static final @ NotNull Set <String > SKIP_TEST_ANNOTATIONS =
32
+ Set .of ("org.junit.jupiter.api.Disabled" , "Disabled" , "org.junit.Ignore" , "Ignore" );
33
+
30
34
private static final @ NotNull Logger LOG = LoggerFactory .getLogger (TestSplit .class );
31
35
32
36
private final int splitIndex ;
@@ -189,7 +193,8 @@ public void run() throws Exception {
189
193
final var className = declaration .getFullyQualifiedName ().orElseThrow ();
190
194
if (declaration .getAnnotations ()
191
195
.stream ()
192
- .anyMatch (annotationExpr -> "Disabled" .equals (annotationExpr .getNameAsString ()))) {
196
+ .map (AnnotationExpr ::getNameAsString )
197
+ .anyMatch (SKIP_TEST_ANNOTATIONS ::contains )) {
193
198
LOG .info ("Skipping disabled test {}" , className );
194
199
} else {
195
200
classNames .add (className );
You can’t perform that action at this time.
0 commit comments