Skip to content

Commit 5b21963

Browse files
Merge branch '3.0.x' into 3.1.x
2 parents 9d2c46a + 3550a6f commit 5b21963

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

spring-session-hazelcast/src/integration-test/java/org/springframework/session/hazelcast/ClientServerHazelcastIndexedSessionRepositoryITests.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import com.hazelcast.core.HazelcastInstance;
2222
import org.junit.jupiter.api.AfterAll;
2323
import org.junit.jupiter.api.BeforeAll;
24-
import org.junit.jupiter.api.Disabled;
2524
import org.junit.jupiter.api.extension.ExtendWith;
2625
import org.testcontainers.containers.GenericContainer;
26+
import org.testcontainers.images.builder.ImageFromDockerfile;
2727
import org.testcontainers.utility.MountableFile;
2828

2929
import org.springframework.context.annotation.Bean;
@@ -45,13 +45,20 @@
4545
@ExtendWith(SpringExtension.class)
4646
@ContextConfiguration
4747
@WebAppConfiguration
48-
@Disabled("Re-enable when Hazelcast image uses JDK 17")
4948
class ClientServerHazelcastIndexedSessionRepositoryITests extends AbstractHazelcastIndexedSessionRepositoryITests {
5049

51-
private static GenericContainer container = new GenericContainer<>("hazelcast/hazelcast:5.0.3-slim")
50+
// @formatter:off
51+
private static GenericContainer container = new GenericContainer<>(new ImageFromDockerfile()
52+
.withDockerfileFromBuilder((builder) -> builder
53+
.from("hazelcast/hazelcast:5.3.2-slim")
54+
.user("root")
55+
.run("apk del --no-cache openjdk11-jre-headless")
56+
.run("apk add --no-cache openjdk17-jre-headless")
57+
.user("hazelcast")))
5258
.withExposedPorts(5701).withCopyFileToContainer(MountableFile.forClasspathResource("/hazelcast-server.xml"),
5359
"/opt/hazelcast/hazelcast.xml")
5460
.withEnv("HAZELCAST_CONFIG", "hazelcast.xml");
61+
// @formatter:on
5562

5663
@BeforeAll
5764
static void setUpClass() {

0 commit comments

Comments
 (0)