diff --git a/sink/pom.xml b/sink/pom.xml index 06c5aa7..b45b2a0 100644 --- a/sink/pom.xml +++ b/sink/pom.xml @@ -62,6 +62,11 @@ spring-cloud-stream-test-support test + + com.h2database + h2 + test + diff --git a/sink/src/test/resources/application.properties b/sink/src/test/resources/application.properties new file mode 100644 index 0000000..eeaa204 --- /dev/null +++ b/sink/src/test/resources/application.properties @@ -0,0 +1,4 @@ +spring.datasource.driver-class-name=org.h2.Driver +spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1 +spring.datasource.username=sa +spring.datasource.password=sa \ No newline at end of file diff --git a/source/pom.xml b/source/pom.xml index d87fc47..c09a47e 100644 --- a/source/pom.xml +++ b/source/pom.xml @@ -62,6 +62,11 @@ spring-boot-starter-test test + + com.h2database + h2 + test + diff --git a/source/src/test/java/demo/ModuleApplicationTests.java b/source/src/test/java/demo/ModuleApplicationTests.java index e1c876b..ca532d9 100644 --- a/source/src/test/java/demo/ModuleApplicationTests.java +++ b/source/src/test/java/demo/ModuleApplicationTests.java @@ -22,7 +22,8 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) -@SpringBootTest +@SpringBootTest( + webEnvironment = SpringBootTest.WebEnvironment.NONE) public class ModuleApplicationTests { @Test diff --git a/source/src/test/resources/application.properties b/source/src/test/resources/application.properties new file mode 100644 index 0000000..eeaa204 --- /dev/null +++ b/source/src/test/resources/application.properties @@ -0,0 +1,4 @@ +spring.datasource.driver-class-name=org.h2.Driver +spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1 +spring.datasource.username=sa +spring.datasource.password=sa \ No newline at end of file