From 0adec6d15acdf8680403c7d10d23b10abdf146f5 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 16 Oct 2023 21:25:28 +0200 Subject: [PATCH] =?UTF-8?q?Apply=20@=E2=81=A0DisabledInAotMode=20to=20rema?= =?UTF-8?q?ining=20@=E2=81=A0ContextHierarchy=20integration=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See gh-29122 --- .../context/hierarchies/meta/MetaHierarchyLevelTwoTests.java | 4 +++- ...hyLevelTwoWithBareContextConfigurationInSubclassTests.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/spring-test/src/test/java/org/springframework/test/context/hierarchies/meta/MetaHierarchyLevelTwoTests.java b/spring-test/src/test/java/org/springframework/test/context/hierarchies/meta/MetaHierarchyLevelTwoTests.java index 2d5b29b95700..ca17f2cce4b4 100644 --- a/spring-test/src/test/java/org/springframework/test/context/hierarchies/meta/MetaHierarchyLevelTwoTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/hierarchies/meta/MetaHierarchyLevelTwoTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import org.springframework.context.annotation.Profile; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.aot.DisabledInAotMode; import static org.assertj.core.api.Assertions.assertThat; @@ -34,6 +35,7 @@ */ @ContextConfiguration @ActiveProfiles("prod") +@DisabledInAotMode // @ContextHierarchy is not supported in AOT. class MetaHierarchyLevelTwoTests extends MetaHierarchyLevelOneTests { @Configuration diff --git a/spring-test/src/test/java/org/springframework/test/context/hierarchies/standard/TestHierarchyLevelTwoWithBareContextConfigurationInSubclassTests.java b/spring-test/src/test/java/org/springframework/test/context/hierarchies/standard/TestHierarchyLevelTwoWithBareContextConfigurationInSubclassTests.java index 904e6991b914..fed405f131c7 100644 --- a/spring-test/src/test/java/org/springframework/test/context/hierarchies/standard/TestHierarchyLevelTwoWithBareContextConfigurationInSubclassTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/hierarchies/standard/TestHierarchyLevelTwoWithBareContextConfigurationInSubclassTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.aot.DisabledInAotMode; import org.springframework.test.context.junit.jupiter.SpringExtension; import static org.assertj.core.api.Assertions.assertThat; @@ -34,6 +35,7 @@ */ @ExtendWith(SpringExtension.class) @ContextConfiguration +@DisabledInAotMode // @ContextHierarchy is not supported in AOT. class TestHierarchyLevelTwoWithBareContextConfigurationInSubclassTests extends TestHierarchyLevelOneWithBareContextConfigurationInSubclassTests {