From 5b1c6381dba6deec3bf7bb1460e5d934b7f7d997 Mon Sep 17 00:00:00 2001 From: thegeekyasian Date: Mon, 22 Aug 2022 13:17:17 +0400 Subject: [PATCH] Adapt deprecated getIpAddress call with getHost in Redis Tests See gh-32131 --- .../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