Adapt deprecated getIpAddress call with getHost in Redis Tests

Closes gh-32147
This commit is contained in:
Stephane Nicoll 2022-08-23 08:25:52 +02:00
parent 463766fd44
commit 50c099334b
1 changed files with 1 additions and 2 deletions

View File

@ -45,8 +45,7 @@ class SampleCacheApplicationRedisTests {
@DynamicPropertySource @DynamicPropertySource
static void redisProperties(DynamicPropertyRegistry properties) { static void redisProperties(DynamicPropertyRegistry properties) {
properties.add("spring.redis.url", properties.add("spring.redis.url", () -> "redis://" + redis.getHost() + ":" + redis.getFirstMappedPort());
() -> "redis://" + redis.getContainerIpAddress() + ":" + redis.getFirstMappedPort());
} }
@Test @Test