re-enable testcontainers
This commit is contained in:
22
spring-boot/cache/src/test/java/io/reflectoring/cache/AbstractIntegrationTest.java
vendored
Normal file
22
spring-boot/cache/src/test/java/io/reflectoring/cache/AbstractIntegrationTest.java
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
package io.reflectoring.cache;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.testcontainers.containers.FixedHostPortGenericContainer;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
|
||||
public class AbstractIntegrationTest {
|
||||
|
||||
static GenericContainer firstMember =
|
||||
new FixedHostPortGenericContainer("hazelcast/hazelcast:4.0.1")
|
||||
.withFixedExposedPort(5701, 5701);
|
||||
|
||||
static GenericContainer secondMember =
|
||||
new FixedHostPortGenericContainer("hazelcast/hazelcast:4.0.1")
|
||||
.withFixedExposedPort(5702, 5701);
|
||||
|
||||
@BeforeAll
|
||||
public static void init() {
|
||||
firstMember.start();
|
||||
secondMember.start();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package io.reflectoring.cache.rest;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.reflectoring.cache.AbstractIntegrationTest;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
@@ -16,7 +17,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
@SpringBootTest
|
||||
@AutoConfigureMockMvc
|
||||
@ActiveProfiles("client")
|
||||
class CarResourceClientCacheIntegrationTest {
|
||||
class CarResourceClientCacheIntegrationTest extends AbstractIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private MockMvc mockMvc;
|
||||
|
||||
Reference in New Issue
Block a user