From 14382ec7bac49c90a73269f3a2d7bff9c17accc7 Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Fri, 2 Mar 2018 11:09:04 -0500 Subject: [PATCH] samples cleanup --- sink/pom.xml | 5 +++++ sink/src/test/resources/application.properties | 4 ++++ source/pom.xml | 5 +++++ source/src/test/java/demo/ModuleApplicationTests.java | 3 ++- source/src/test/resources/application.properties | 4 ++++ 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 sink/src/test/resources/application.properties create mode 100644 source/src/test/resources/application.properties 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