Browse Source

Find @⁠DisabledInAotMode on enclosing classes for @⁠Nested tests

See gh-30834
pull/31445/head
Sam Brannen 2 years ago
parent
commit
28939e4754
  1. 3
      spring-test/src/main/java/org/springframework/test/context/aot/TestContextAotGenerator.java

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

@ -55,6 +55,7 @@ import org.springframework.test.context.ContextLoadException; @@ -55,6 +55,7 @@ import org.springframework.test.context.ContextLoadException;
import org.springframework.test.context.ContextLoader;
import org.springframework.test.context.MergedContextConfiguration;
import org.springframework.test.context.SmartContextLoader;
import org.springframework.test.context.TestContextAnnotationUtils;
import org.springframework.test.context.TestContextBootstrapper;
import org.springframework.util.Assert;
import org.springframework.util.LinkedMultiValueMap;
@ -94,7 +95,7 @@ public class TestContextAotGenerator { @@ -94,7 +95,7 @@ public class TestContextAotGenerator {
private static final Log logger = LogFactory.getLog(TestContextAotGenerator.class);
private static final Predicate<? super Class<?>> isDisabledInAotMode =
testClass -> MergedAnnotations.from(testClass).isPresent(DisabledInAotMode.class);
testClass -> TestContextAnnotationUtils.hasAnnotation(testClass, DisabledInAotMode.class);
private final ApplicationContextAotGenerator aotGenerator = new ApplicationContextAotGenerator();

Loading…
Cancel
Save