List of usage examples for org.springframework.data.redis.connection.lettuce LettuceConnectionFactory isRedisSentinelAware
public boolean isRedisSentinelAware()
From source file:org.springframework.boot.autoconfigure.data.redis.RedisAutoConfigurationTests.java
@Test public void testRedisConfigurationWithSentinelAndDatabase() { this.contextRunner.withPropertyValues("spring.redis.database:1", "spring.redis.sentinel.master:mymaster", "spring.redis.sentinel.nodes:127.0.0.1:26379, 127.0.0.1:26380").run((context) -> { LettuceConnectionFactory connectionFactory = context.getBean(LettuceConnectionFactory.class); assertThat(connectionFactory.getDatabase()).isEqualTo(1); assertThat(connectionFactory.isRedisSentinelAware()).isTrue(); });// w w w. ja v a2 s. c o m }