From 50c099334bd86680da46260b1a14af7e0e277645 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 23 Aug 2022 08:25:52 +0200 Subject: [PATCH] Adapt deprecated getIpAddress call with getHost in Redis Tests Closes gh-32147 --- .../java/smoketest/cache/SampleCacheApplicationRedisTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/src/redisTest/java/smoketest/cache/SampleCacheApplicationRedisTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/src/redisTest/java/smoketest/cache/SampleCacheApplicationRedisTests.java index fee509dde1..43f6f8e12c 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/src/redisTest/java/smoketest/cache/SampleCacheApplicationRedisTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/src/redisTest/java/smoketest/cache/SampleCacheApplicationRedisTests.java @@ -45,8 +45,7 @@ class SampleCacheApplicationRedisTests { @DynamicPropertySource static void redisProperties(DynamicPropertyRegistry properties) { - properties.add("spring.redis.url", - () -> "redis://" + redis.getContainerIpAddress() + ":" + redis.getFirstMappedPort()); + properties.add("spring.redis.url", () -> "redis://" + redis.getHost() + ":" + redis.getFirstMappedPort()); } @Test