From 70017c1ecc00ed3ded1289ece9672f0df21bf316 Mon Sep 17 00:00:00 2001 From: Gennady Kuzmin Date: Fri, 7 Oct 2022 23:51:29 +1000 Subject: [PATCH] feature/update-versions-GK --- pom.xml | 8 ++++---- .../customizer/PropertyMutationContextCustomizer.java | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index c23d657..ad5a3a5 100644 --- a/pom.xml +++ b/pom.xml @@ -60,8 +60,8 @@ 3.8.1 5.5.0 - 5.5.0 - 1.5.0 + 5.9.0 + 1.9.0 @@ -129,13 +129,13 @@ org.testcontainers testcontainers - 1.11.4 + 1.17.5 org.redisson redisson - 3.10.7 + 3.17.7 test diff --git a/src/main/java/com/jupitertools/springtestredis/customizer/PropertyMutationContextCustomizer.java b/src/main/java/com/jupitertools/springtestredis/customizer/PropertyMutationContextCustomizer.java index b0f7de8..43bd816 100644 --- a/src/main/java/com/jupitertools/springtestredis/customizer/PropertyMutationContextCustomizer.java +++ b/src/main/java/com/jupitertools/springtestredis/customizer/PropertyMutationContextCustomizer.java @@ -38,11 +38,12 @@ public void customizeContext(ConfigurableApplicationContext context, for (RedisContainerDescription description : descriptions) { logger.info("Start REDIS TestContainer"); - GenericContainer redis = new GenericContainer("redis:latest").withExposedPorts(REDIS_PORT); + GenericContainer redis = new GenericContainer("redis:7.0.5-alpine").withExposedPorts(REDIS_PORT); + redis.withReuse(true); redis.start(); System.setProperty(description.getHostPropertyName(), - redis.getContainerIpAddress()); + redis.getHost()); System.setProperty(description.getPortPropertyName(), redis.getMappedPort(REDIS_PORT).toString());