Fix test to create correct type of child context
Closes gh-32002
This commit is contained in:
parent
846340ad62
commit
fb2f7c1e38
|
|
@ -25,6 +25,7 @@ import org.junit.jupiter.api.BeforeEach;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.aot.AotDetector;
|
||||
import org.springframework.aot.test.generator.compile.CompileWithTargetClassAccess;
|
||||
import org.springframework.aot.test.generator.compile.TestCompiler;
|
||||
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
|
||||
|
|
@ -86,7 +87,8 @@ class ChildManagementContextInitializerAotTests {
|
|||
.getInstance(ApplicationContextInitializer.class, className.toString());
|
||||
initializer.initialize(freshApplicationContext);
|
||||
assertThat(output).satisfies(numberOfOccurrences("Tomcat started on port", 0));
|
||||
freshApplicationContext.refresh();
|
||||
TestPropertyValues.of(AotDetector.AOT_ENABLED + "=true")
|
||||
.applyToSystemProperties(freshApplicationContext::refresh);
|
||||
assertThat(output).satisfies(numberOfOccurrences("Tomcat started on port", 2));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue