diff --git a/pom.xml b/pom.xml index a7d8d840b..8d798cae5 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.boot spring-boot-starter-parent - 3.3.10 + 3.4.4 @@ -84,6 +84,7 @@ UTF-8 UTF-8 2.18.0 + 1.20.6 @@ -95,7 +96,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 org.apache.maven.plugins @@ -164,9 +165,15 @@ commons-io ${commons-io.version} + + org.postgresql + postgresql + runtime + org.hsqldb hsqldb + runtime org.apache.activemq @@ -188,7 +195,25 @@ org.seleniumhq.selenium - htmlunit-driver + htmlunit3-driver + test + + + org.testcontainers + testcontainers + ${testcontainers.version} + test + + + org.testcontainers + junit-jupiter + ${testcontainers.version} + test + + + org.testcontainers + postgresql + ${testcontainers.version} test diff --git a/src/main/java/se/citerus/dddsample/infrastructure/sampledata/SampleDataGenerator.java b/src/main/java/se/citerus/dddsample/infrastructure/sampledata/SampleDataGenerator.java index 23e3f6471..3c9943cc5 100644 --- a/src/main/java/se/citerus/dddsample/infrastructure/sampledata/SampleDataGenerator.java +++ b/src/main/java/se/citerus/dddsample/infrastructure/sampledata/SampleDataGenerator.java @@ -66,7 +66,8 @@ public void loadHibernateData(TransactionTemplate tt, final HandlingEventFactory tt.execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus status) { - for (Location location : SampleLocations.getAll()) { + var locations = SampleLocations.getAll(); + for (Location location : locations) { locationRepository.store(location); } diff --git a/src/test/java/se/citerus/dddsample/infrastructure/persistence/inmemory/LocationRepositoryInMem.java b/src/test/java/se/citerus/dddsample/infrastructure/persistence/inmemory/LocationRepositoryInMem.java index 3f468d2c3..9d1c2ec77 100644 --- a/src/test/java/se/citerus/dddsample/infrastructure/persistence/inmemory/LocationRepositoryInMem.java +++ b/src/test/java/se/citerus/dddsample/infrastructure/persistence/inmemory/LocationRepositoryInMem.java @@ -10,7 +10,8 @@ public class LocationRepositoryInMem implements LocationRepository { public Location find(UnLocode unLocode) { - for (Location location : SampleLocations.getAll()) { + var locations = SampleLocations.getAll(); + for (Location location : locations) { if (location.unLocode().equals(unLocode)) { return location; }