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

See gh-30834
This commit is contained in:
Sam Brannen 2023-10-16 16:00:04 +02:00
parent fc81cc5cda
commit 28939e4754
1 changed files with 2 additions and 1 deletions

View File

@ -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 {
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();