mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 10:58:42 +00:00
* fix: Change h2 database usage to in mem (#2366) * #2366 Add delay option
This commit is contained in:
@@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory;
|
||||
*/
|
||||
public class App {
|
||||
|
||||
private static final String H2_DB_URL = "jdbc:h2:~/test";
|
||||
private static final String H2_DB_URL = "jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1";
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ import org.mockito.Mockito;
|
||||
*/
|
||||
class HotelDaoImplTest {
|
||||
|
||||
private static final String DB_URL = "jdbc:h2:~/test";
|
||||
private static final String DB_URL = "jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1";
|
||||
private HotelDaoImpl dao;
|
||||
private Room existingRoom = new Room(1, "Single", 50, false);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
|
||||
*/
|
||||
class HotelTest {
|
||||
|
||||
private static final String H2_DB_URL = "jdbc:h2:~/test";
|
||||
private static final String H2_DB_URL = "jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1";
|
||||
|
||||
private Hotel hotel;
|
||||
private HotelDaoImpl dao;
|
||||
|
||||
Reference in New Issue
Block a user