From 28939e47545708be7d4b71b63e36109dd3cf78bd Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 16 Oct 2023 16:00:04 +0200 Subject: [PATCH] =?UTF-8?q?Find=20@=E2=81=A0DisabledInAotMode=20on=20enclo?= =?UTF-8?q?sing=20classes=20for=20@=E2=81=A0Nested=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See gh-30834 --- .../test/context/aot/TestContextAotGenerator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-test/src/main/java/org/springframework/test/context/aot/TestContextAotGenerator.java b/spring-test/src/main/java/org/springframework/test/context/aot/TestContextAotGenerator.java index d9cad25adb2..d3fa761afd1 100644 --- a/spring-test/src/main/java/org/springframework/test/context/aot/TestContextAotGenerator.java +++ b/spring-test/src/main/java/org/springframework/test/context/aot/TestContextAotGenerator.java @@ -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> isDisabledInAotMode = - testClass -> MergedAnnotations.from(testClass).isPresent(DisabledInAotMode.class); + testClass -> TestContextAnnotationUtils.hasAnnotation(testClass, DisabledInAotMode.class); private final ApplicationContextAotGenerator aotGenerator = new ApplicationContextAotGenerator();