Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkopp committed Apr 11, 2024
1 parent ecce1ad commit 8643bd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ public abstract class BaseRepositoryTest {
*/
@BeforeEach
void populateRepository() throws InsufficientUnitsAvailableException {
productRepository.deleteAll();
reservationRepository.deleteAll();

InventoryItem item1 = new InventoryItem("id1", "name1", "description1", 15, 0.5);
InventoryItem item1 = new InventoryItem(null, "name1", "description1", 15, 0.5);

item1.addReservation(existingSession1, 1);
item1.addReservation(existingSession2, 2);
item1.addReservation(existingSession3, 3);

InventoryItem item2 = new InventoryItem("id2", "name2", "description2", 200, 1.5);
InventoryItem item2 = new InventoryItem(null, "name2", "description2", 200, 1.5);
item2.addReservation(existingSession1, 4);

id1 = productRepository.save(item1).getId();
Expand Down
9 changes: 5 additions & 4 deletions src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ spring:
jpa:
database: h2
open-in-view: false
# properties:
# hibernate:
# enable_lazy_load_no_trans: true
hibernate:
ddl-auto: create-drop
properties:
hibernate:
generate_statistics: false
show_sql: true
format_sql: false
datasource:
url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false
username: username
Expand All @@ -26,7 +28,6 @@ spring:
logging:
level:
ROOT: INFO
org.hibernate.SQL: DEBUG
de.unistuttgart.t2.modulith: DEBUG

# org.springframework.orm.jpa: TRACE
Expand Down

0 comments on commit 8643bd2

Please sign in to comment.