Use AbstractAotProcessor.AOT_PROCESSING instead of duplicate constant

Closes gh-42461
This commit is contained in:
Stéphane Nicoll
2024-10-18 08:07:45 +02:00
parent 5806915155
commit b7979cf443
9 changed files with 18 additions and 9 deletions

View File

@@ -30,6 +30,7 @@ import org.springframework.beans.factory.support.AbstractBeanFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.aot.AbstractAotProcessor;
import org.springframework.core.env.MapPropertySource;
import static org.assertj.core.api.Assertions.assertThat;
@@ -149,7 +150,7 @@ class TestcontainersLifecycleApplicationContextInitializerTests {
GenericContainer<?> container = mock(GenericContainer.class);
AnnotationConfigApplicationContext applicationContext = createApplicationContext(container);
then(container).shouldHaveNoInteractions();
withSystemProperty("spring.aot.processing", "true",
withSystemProperty(AbstractAotProcessor.AOT_PROCESSING, "true",
() -> applicationContext.refreshForAotProcessing(new RuntimeHints()));
then(container).shouldHaveNoInteractions();
applicationContext.close();