File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
resources/org/jooby/jedis
test/java/org/jooby/jedis Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -238,9 +238,9 @@ public class RedisSentinel extends Redis {
238238 * application.conf
239239 *
240240 * <pre>
241- * jedis.sentinel.hosts = ["localhost:26379"]
241+ * jedis.sentinel.hosts = ["localhost:26379", "host2:26379" ]
242242 * jedis.sentinel.master = "master"
243- * jedis.password = ""
243+ * jedis.password = "mySuperSecretPasswordPutHere "
244244 * </pre>
245245 *
246246 * Example:
Original file line number Diff line number Diff line change @@ -25,6 +25,6 @@ jedis.pool.jmxNamePrefix = redis-pool
2525jedis.session.prefix = sessions
2626jedis.session.timeout = ${session.timeout}
2727
28- jedis.sentinel.hosts = ["localhost:26379" ]
28+ jedis.sentinel.hosts = []
2929jedis.sentinel.master = "master"
3030jedis.password = ""
Original file line number Diff line number Diff line change 1717import org .powermock .modules .junit4 .PowerMockRunner ;
1818import redis .clients .jedis .JedisSentinelPool ;
1919
20+ import java .util .Collections ;
2021import java .util .HashSet ;
2122import java .util .Set ;
2223
@@ -38,7 +39,8 @@ public class RedisSentinelTest {
3839 @ SuppressWarnings ("unchecked" )
3940 @ Test
4041 public void shouldGetJedisSentinelInstance () throws Exception {
41- Config config = jedisConfig ().withValue ("db" , ConfigValueFactory .fromAnyRef ("redis://localhost:26379" ));
42+ Config config = jedisConfig ().withValue ("db" , ConfigValueFactory .fromAnyRef ("redis://localhost:26379" ))
43+ .withValue ("jedis.sentinel.hosts" , ConfigValueFactory .fromAnyRef (Collections .singletonList ("localhost:26379" )));
4244 new MockUnit (Env .class , Binder .class , JedisSentinelPool .class )
4345 .expect (unit -> {
4446 Env env = unit .get (Env .class );
You can’t perform that action at this time.
0 commit comments