DATAJDBC-198 - Prevent HSQL specific tests to run when a different database profile is selected.

Set active profile on HSQL specific tests to HSQL.

Fixed Readme to properly reflect the need to have a Docker installation.

Original pull request: #59.
This commit is contained in:
Chr1st0ph
2018-04-12 12:41:41 +02:00
committed by Jens Schauder
parent eb0f62181e
commit 5382d3b94e
4 changed files with 7 additions and 1 deletions

View File

@@ -339,7 +339,7 @@ This will execute unit tests and integration tests using an in-memory database.
=== Running tests with a real database
To run the integration tests against a specific database you need to have the database running on your local machine and then execute.
In order to run the integration tests against a specific database you need to have a local Docker installation available, and then execute.
[source]
----

View File

@@ -37,6 +37,7 @@ import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.repository.CrudRepository;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
@@ -49,6 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
* @author Jens Schauder
*/
@ContextConfiguration
@ActiveProfiles("hsql")
@Transactional
public class MyBatisCustomizingNamespaceHsqlIntegrationTests {

View File

@@ -36,6 +36,7 @@ import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.repository.CrudRepository;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
@@ -48,6 +49,7 @@ import org.springframework.transaction.annotation.Transactional;
* @author Greg Turnquist
*/
@ContextConfiguration
@ActiveProfiles("hsql")
@Transactional
public class MyBatisHsqlIntegrationTests {

View File

@@ -36,6 +36,7 @@ import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
@@ -48,6 +49,7 @@ import org.springframework.transaction.annotation.Transactional;
* @author Kazuki Shimizu
*/
@ContextConfiguration
@ActiveProfiles("hsql")
@Transactional
public class QueryAnnotationHsqlIntegrationTests {