Proper master failover detection depends on testOnBorrow

This commit is contained in:
Nelson Rodrigues
2014-07-28 11:35:39 -07:00
parent c02c663776
commit fceb719848

View File

@@ -65,6 +65,9 @@ public class JedisSentinelPool extends Pool<Jedis> {
public JedisSentinelPool(String masterName, Set<String> sentinels,
final GenericObjectPoolConfig poolConfig, int timeout,
final String password, final int database) {
// Proper master failover detection dependes on testOnBorrow, so force it here
poolConfig.setTestOnBorrow(true);
this.poolConfig = poolConfig;
this.timeout = timeout;
this.password = password;