Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Roiocam committed Mar 21, 2024
1 parent 1eb5526 commit a152570
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ public JedisClusterWrapper(Set<HostAndPort> hostAndPortSet, int connectionTimeou
this.provider = new ClusterConnectionProvider(hostAndPortSet, jedisClientConfig, poolConfig);
}

/**
* only for unit test
* @param hostAndPortSet
*/
public JedisClusterWrapper(Set<HostAndPort> hostAndPortSet) {
super(hostAndPortSet);
DefaultJedisClientConfig defaultConfig = DefaultJedisClientConfig.builder().build();
this.provider = new ClusterConnectionProvider(hostAndPortSet, defaultConfig);
}

public ClusterPipeline getPipeline() {
return new ClusterPipeline(provider);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void testCluster() throws Exception {
jedisClusterNodes.add(new HostAndPort("127.0.0.1", 7000));
jedisClusterNodes.add(new HostAndPort("127.0.0.1", 7001));
jedisClusterNodes.add(new HostAndPort("127.0.0.1", 7002));
JedisCluster jedis = new JedisCluster(jedisClusterNodes);
JedisCluster jedis = new JedisClusterWrapper(jedisClusterNodes);
testImpl(jedis);
}

Expand Down

0 comments on commit a152570

Please sign in to comment.