Skip to content

Commit c24ac0a

Browse files
committed
fix: h2 inmemory database to pass CI
1 parent 1fda840 commit c24ac0a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dao-factory/src/main/java/com/iluwatar/daofactory/H2DataSourceFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
/** H2DataSourceFactory concrete factory. */
77
public class H2DataSourceFactory extends DAOFactory {
8-
private final String DB_URL = "jdbc:h2:~/test";
8+
private final String DB_URL = "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1";
99
private final String USER = "sa";
1010
private final String PASS = "";
1111

dao-factory/src/test/java/com/iluwatar/daofactory/H2CustomerDAOTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/** Tests {@link H2CustomerDAO} */
2424
public class H2CustomerDAOTest {
25-
private final String DB_URL = "jdbc:h2:~/test";
25+
private final String DB_URL = "jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1";
2626
private final String USER = "sa";
2727
private final String PASS = "";
2828
private final String CREATE_SCHEMA =

0 commit comments

Comments
 (0)