add integration test profile
This commit is contained in:
parent
60d60508c3
commit
60a1c5f481
|
@ -161,9 +161,55 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/*IntegrationTest.java</exclude>
|
||||
<exclude>**/*LiveTest.java</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>integration</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/*LiveTest.java</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*IntegrationTest.java</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<test.mime>json</test.mime>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<properties>
|
||||
<org.jooq.version>3.7.3</org.jooq.version>
|
||||
<com.h2database.version>1.4.191</com.h2database.version>
|
||||
|
@ -173,6 +219,7 @@
|
|||
<junit.version>4.12</junit.version>
|
||||
|
||||
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
|
||||
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -22,7 +22,7 @@ import javax.sql.DataSource;
|
|||
@ComponentScan({ "com.baeldung.jooq.introduction.db.public_.tables" })
|
||||
@EnableTransactionManagement
|
||||
@PropertySource("classpath:intro_config.properties")
|
||||
public class PersistenceContext {
|
||||
public class PersistenceContextIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private Environment environment;
|
|
@ -17,10 +17,10 @@ import static com.baeldung.jooq.introduction.db.public_.tables.AuthorBook.AUTHOR
|
|||
import static com.baeldung.jooq.introduction.db.public_.tables.Book.BOOK;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@ContextConfiguration(classes = PersistenceContext.class)
|
||||
@ContextConfiguration(classes = PersistenceContextIntegrationTest.class)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
public class QueryTest {
|
||||
public class QueryIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private DSLContext dsl;
|
|
@ -20,7 +20,7 @@ import static org.junit.Assert.assertEquals;
|
|||
@SpringApplicationConfiguration(Application.class)
|
||||
@Transactional("transactionManager")
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
public class SpringBootTest {
|
||||
public class SpringBootIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private DSLContext dsl;
|
Loading…
Reference in New Issue