Commit eb035398 authored by Phillip Webb's avatar Phillip Webb

Add SqlScriptsTestExecutionListener

Update @IntegrationTest to include SqlScriptsTestExecutionListener.

Fixes gh-1965
parent 2a857902
...@@ -25,6 +25,7 @@ import java.lang.annotation.Target; ...@@ -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 ...@@ -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 { ...@@ -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");
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment