Skip to content

Commit 28939e4

Browse files
committed
Find @⁠DisabledInAotMode on enclosing classes for @⁠Nested tests
See gh-30834
1 parent fc81cc5 commit 28939e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-test/src/main/java/org/springframework/test/context/aot/TestContextAotGenerator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import org.springframework.test.context.ContextLoader;
5656
import org.springframework.test.context.MergedContextConfiguration;
5757
import org.springframework.test.context.SmartContextLoader;
58+
import org.springframework.test.context.TestContextAnnotationUtils;
5859
import org.springframework.test.context.TestContextBootstrapper;
5960
import org.springframework.util.Assert;
6061
import org.springframework.util.LinkedMultiValueMap;
@@ -94,7 +95,7 @@ public class TestContextAotGenerator {
9495
private static final Log logger = LogFactory.getLog(TestContextAotGenerator.class);
9596

9697
private static final Predicate<? super Class<?>> isDisabledInAotMode =
97-
testClass -> MergedAnnotations.from(testClass).isPresent(DisabledInAotMode.class);
98+
testClass -> TestContextAnnotationUtils.hasAnnotation(testClass, DisabledInAotMode.class);
9899

99100

100101
private final ApplicationContextAotGenerator aotGenerator = new ApplicationContextAotGenerator();

0 commit comments

Comments
 (0)