Browse Source

Add SqlScriptsTestExecutionListener

Update @IntegrationTest to include SqlScriptsTestExecutionListener.

Fixes gh-1965
pull/1732/merge
Phillip Webb 11 years ago
parent
commit
eb035398b2
  1. 3
      spring-boot/src/main/java/org/springframework/boot/test/IntegrationTest.java
  2. 1
      spring-boot/src/main/java/org/springframework/boot/test/IntegrationTestPropertiesListener.java

3
spring-boot/src/main/java/org/springframework/boot/test/IntegrationTest.java

@ -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.test.context.TestExecutionListeners;
import org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.test.context.support.DirtiesContextTestExecutionListener;
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,
DependencyInjectionTestExecutionListener.class,
DirtiesContextTestExecutionListener.class,
TransactionalTestExecutionListener.class })
TransactionalTestExecutionListener.class, SqlScriptsTestExecutionListener.class })
public @interface IntegrationTest {
/**

1
spring-boot/src/main/java/org/springframework/boot/test/IntegrationTestPropertiesListener.java

@ -82,4 +82,5 @@ class IntegrationTestPropertiesListener extends AbstractTestExecutionListener { @@ -82,4 +82,5 @@ class IntegrationTestPropertiesListener extends AbstractTestExecutionListener {
private void addIntegrationTestProperty(Set<String> propertySourceProperties) {
propertySourceProperties.add(IntegrationTest.class.getName() + "=true");
}
}

Loading…
Cancel
Save