Skip to content

Commit

Permalink
use h2 in-memory mode in spring tests (#424)
Browse files Browse the repository at this point in the history
* use h2 in-memory mode in spring tests

Signed-off-by: nhartner <nhartner@gmail.com>
  • Loading branch information
nhartner authored and sappenin committed Nov 13, 2019
1 parent bfc2e8a commit db0592c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions connector-server/src/main/resources/application-h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ spring:
format_sql: false
liquibase:
enabled: false

---
## default h2 profile makes a persistent database. this additional profile overrides it to in-memory
spring:
profiles: h2-in-memory
datasource:
url: jdbc:h2:mem:example-app;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
2 changes: 1 addition & 1 deletion connector-server/src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties
spring:
profiles:
include: dev
include: dev,h2-in-memory
output:
ansi:
enabled: ALWAYS
Expand Down

0 comments on commit db0592c

Please sign in to comment.