refactor: #2366 Change h2 database usage to in mem (#2776)

* fix: Change h2 database usage to in mem (#2366)

* #2366 Add delay option
This commit is contained in:
Jakub Klimek
2024-01-27 12:07:10 +01:00
committed by GitHub
parent 7a966a5786
commit 0f39267a19
14 changed files with 37 additions and 13 deletions
@@ -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;