File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
spring-boot/cache/src/test/java/io/reflectoring/cache Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 1+ package io .reflectoring .cache ;
2+
3+ import org .junit .jupiter .api .BeforeAll ;
4+ import org .testcontainers .containers .FixedHostPortGenericContainer ;
5+ import org .testcontainers .containers .GenericContainer ;
6+
7+ public class AbstractIntegrationTest {
8+
9+ static GenericContainer firstMember =
10+ new FixedHostPortGenericContainer ("hazelcast/hazelcast:4.0.1" )
11+ .withFixedExposedPort (5701 , 5701 );
12+
13+ static GenericContainer secondMember =
14+ new FixedHostPortGenericContainer ("hazelcast/hazelcast:4.0.1" )
15+ .withFixedExposedPort (5702 , 5701 );
16+
17+ @ BeforeAll
18+ public static void init () {
19+ firstMember .start ();
20+ secondMember .start ();
21+ }
22+ }
Original file line number Diff line number Diff line change 22
33
44import com .fasterxml .jackson .databind .ObjectMapper ;
5+ import io .reflectoring .cache .AbstractIntegrationTest ;
56import org .junit .jupiter .api .Test ;
67import org .springframework .beans .factory .annotation .Autowired ;
78import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
1617@ SpringBootTest
1718@ AutoConfigureMockMvc
1819@ ActiveProfiles ("client" )
19- class CarResourceClientCacheIntegrationTest {
20+ class CarResourceClientCacheIntegrationTest extends AbstractIntegrationTest {
2021
2122 @ Autowired
2223 private MockMvc mockMvc ;
You can’t perform that action at this time.
0 commit comments