Add SqlScriptsTestExecutionListener
Update @IntegrationTest to include SqlScriptsTestExecutionListener. Fixes gh-1965
This commit is contained in:
parent
2a8579026f
commit
eb035398b2
|
|
@ -25,6 +25,7 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
||||||
import org.springframework.test.context.TestExecutionListeners;
|
import org.springframework.test.context.TestExecutionListeners;
|
||||||
|
import org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener;
|
||||||
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
|
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
|
||||||
import org.springframework.test.context.support.DirtiesContextTestExecutionListener;
|
import org.springframework.test.context.support.DirtiesContextTestExecutionListener;
|
||||||
import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
|
import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
|
||||||
|
|
@ -44,7 +45,7 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
|
||||||
@TestExecutionListeners(listeners = { IntegrationTestPropertiesListener.class,
|
@TestExecutionListeners(listeners = { IntegrationTestPropertiesListener.class,
|
||||||
DependencyInjectionTestExecutionListener.class,
|
DependencyInjectionTestExecutionListener.class,
|
||||||
DirtiesContextTestExecutionListener.class,
|
DirtiesContextTestExecutionListener.class,
|
||||||
TransactionalTestExecutionListener.class })
|
TransactionalTestExecutionListener.class, SqlScriptsTestExecutionListener.class })
|
||||||
public @interface IntegrationTest {
|
public @interface IntegrationTest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -82,4 +82,5 @@ class IntegrationTestPropertiesListener extends AbstractTestExecutionListener {
|
||||||
private void addIntegrationTestProperty(Set<String> propertySourceProperties) {
|
private void addIntegrationTestProperty(Set<String> propertySourceProperties) {
|
||||||
propertySourceProperties.add(IntegrationTest.class.getName() + "=true");
|
propertySourceProperties.add(IntegrationTest.class.getName() + "=true");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue