DATAREDIS-1127 - Handling ping failures for getSentinelConnection method.
Original Pull Request: #524
This commit is contained in:
committed by
Christoph Strobl
parent
254d60e820
commit
964c55959a
@@ -31,6 +31,7 @@ import org.springframework.data.redis.test.util.RedisSentinelRule;
|
||||
* @author Christoph Strobl
|
||||
* @author Fu Jian
|
||||
* @author Mark Paluch
|
||||
* @author Ajith Kumar
|
||||
*/
|
||||
public class JedisConnectionFactorySentinelIntegrationTests {
|
||||
|
||||
@@ -82,4 +83,14 @@ public class JedisConnectionFactorySentinelIntegrationTests {
|
||||
|
||||
assertThat(factory.getConnection().getClientName()).isEqualTo("clientName");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldNotFailOnFirstSentinelDown() {
|
||||
|
||||
final RedisSentinelConfiguration multiSentinelConfig = new RedisSentinelConfiguration()
|
||||
.master("mymaster").sentinel("any.unavailable.host",26379).sentinel("127.0.0.1", 26379);
|
||||
|
||||
factory = new JedisConnectionFactory(multiSentinelConfig);
|
||||
assertThat(factory.getSentinelConnection().isOpen()).isTrue();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user