diff --git a/.github/workflows/boot-jpa-hibernate2ndlevelcache-sample.yml b/.github/workflows/boot-jpa-hibernate2ndlevelcache-sample.yml index ad26accdc..fecb7b89a 100644 --- a/.github/workflows/boot-jpa-hibernate2ndlevelcache-sample.yml +++ b/.github/workflows/boot-jpa-hibernate2ndlevelcache-sample.yml @@ -31,10 +31,10 @@ jobs: java-version: 21 distribution: "zulu" cache: "maven" - - name: Start up redis & postgres via Docker Compose + - name: Start up redis via Docker Compose run: | cd docker - docker compose up -d postgresqldb redis + docker compose up -d redis sleep 5 docker ps -a - name: Build and analyze diff --git a/jpa/boot-hibernate2ndlevelcache-sample/src/test/java/com/example/hibernatecache/TestApplication.java b/jpa/boot-hibernate2ndlevelcache-sample/src/test/java/com/example/hibernatecache/TestApplication.java index fdf1bf3fd..2fbc127e1 100644 --- a/jpa/boot-hibernate2ndlevelcache-sample/src/test/java/com/example/hibernatecache/TestApplication.java +++ b/jpa/boot-hibernate2ndlevelcache-sample/src/test/java/com/example/hibernatecache/TestApplication.java @@ -7,7 +7,7 @@ @TestConfiguration(proxyBeanMethods = false) @ImportTestcontainers(TestContainersConfig.class) -class TestApplication { +public class TestApplication { public static void main(String[] args) { SpringApplication.from(Application::main).with(TestApplication.class).run(args); diff --git a/jpa/boot-hibernate2ndlevelcache-sample/src/test/java/com/example/hibernatecache/common/AbstractIntegrationTest.java b/jpa/boot-hibernate2ndlevelcache-sample/src/test/java/com/example/hibernatecache/common/AbstractIntegrationTest.java index 597fa312b..9164f2e94 100644 --- a/jpa/boot-hibernate2ndlevelcache-sample/src/test/java/com/example/hibernatecache/common/AbstractIntegrationTest.java +++ b/jpa/boot-hibernate2ndlevelcache-sample/src/test/java/com/example/hibernatecache/common/AbstractIntegrationTest.java @@ -3,6 +3,7 @@ import static com.example.hibernatecache.utils.AppConstants.PROFILE_TEST; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; +import com.example.hibernatecache.TestApplication; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @@ -11,7 +12,7 @@ import org.springframework.test.web.servlet.MockMvc; @ActiveProfiles({PROFILE_TEST}) -@SpringBootTest(webEnvironment = RANDOM_PORT) +@SpringBootTest(webEnvironment = RANDOM_PORT, classes = TestApplication.class) @AutoConfigureMockMvc public abstract class AbstractIntegrationTest {