Register runtime hints for @Sql scripts
SqlScriptsTestExecutionListener now implements AotTestExecutionListener in order to register run-time hints for SQL scripts used by test classes and test methods annotated with @Sql if the configured or detected SQL scripts are classpath resources. Closes gh-29027
This commit is contained in:
@@ -191,6 +191,12 @@ class TestContextAotGeneratorTests extends AbstractAotTests {
|
||||
// @WebAppConfiguration(value = ...)
|
||||
assertThat(resource().forResource("/META-INF/web-resources/resources/Spring.js")).accepts(runtimeHints);
|
||||
assertThat(resource().forResource("/META-INF/web-resources/WEB-INF/views/home.jsp")).accepts(runtimeHints);
|
||||
|
||||
// @Sql(scripts = ...)
|
||||
assertThat(resource().forResource("/org/springframework/test/context/jdbc/schema.sql"))
|
||||
.accepts(runtimeHints);
|
||||
assertThat(resource().forResource("/org/springframework/test/context/aot/samples/jdbc/SqlScriptsSpringJupiterTests.test.sql"))
|
||||
.accepts(runtimeHints);
|
||||
}
|
||||
|
||||
private static void assertReflectionRegistered(RuntimeHints runtimeHints, String type, MemberCategory memberCategory) {
|
||||
|
||||
Reference in New Issue
Block a user