Browse Source

Adapt deprecated getIpAddress call with getHost in Redis Tests

See gh-32131
pull/32861/head
thegeekyasian 3 years ago committed by Stephane Nicoll
parent
commit
5b1c6381db
  1. 3
      spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/src/redisTest/java/smoketest/cache/SampleCacheApplicationRedisTests.java

3
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/src/redisTest/java/smoketest/cache/SampleCacheApplicationRedisTests.java vendored

@ -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

Loading…
Cancel
Save