-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
throw exception if JedisCluster cannot connect to any host-port (#2721)
Original PR: #2275 Original author: @chinafzy If none of the `startNodes`, given in JedisCluster constructor, works: - JedisCluster does not work. - No message/exception comes up. - JedisCluster cannot not retry later. User would be instantly aware if an exception is thrown. Co-authored-by: fangzeyu <zeyu.fang@chelaile.net.cn>
- Loading branch information
Showing
4 changed files
with
45 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/test/java/redis/clients/jedis/JedisClusterWithoutSetupTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package redis.clients.jedis; | ||
|
||
import org.junit.Test; | ||
|
||
import redis.clients.jedis.exceptions.JedisClusterOperationException; | ||
|
||
public class JedisClusterWithoutSetupTest { | ||
|
||
@Test(expected = JedisClusterOperationException.class) | ||
public void uselessStartNodes() { | ||
new JedisCluster(new HostAndPort("localhost", 7378)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters