Skip to content

Commit

Permalink
Merge e28745a into 24653e0
Browse files Browse the repository at this point in the history
  • Loading branch information
gerzse authored Mar 15, 2024
2 parents 24653e0 + e28745a commit 7090808
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/redis/clients/jedis/PipeliningBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ public Response<Set<String>> sdiff(String... keys) {
}

@Override
public Response<Long> sdiffStore(String dstKey, String... keys) {
public Response<Long> sdiffstore(String dstKey, String... keys) {
return appendCommand(commandObjects.sdiffstore(dstKey, keys));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ default Response<ScanResult<String>> sscan(String key, String cursor) {

Response<Set<String>> sdiff(String... keys);

Response<Long> sdiffStore(String dstKey, String... keys);
Response<Long> sdiffstore(String dstKey, String... keys);

/**
* @deprecated Use {@code redis.clients.jedis.commands.SetPipelineCommands#sdiffstore(java.lang.String, java.lang.String...)}
*/
default Response<Long> sdiffStore(String dstKey, String... keys) {
return sdiffstore(dstKey, keys);
}

Response<Set<String>> sinter(String... keys);

Expand Down
4 changes: 3 additions & 1 deletion src/test/java/redis/clients/jedis/ClusterPipeliningTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ public void clusterPipelineSet() {
Response<Long> r1 = p.sadd("my{set}", "hello", "hello", "world", "foo", "bar");
p.sadd("mynew{set}", "hello", "hello", "world");
Response<Set<String>> r2 = p.sdiff("my{set}", "mynew{set}");
Response<Long> r3 = p.sdiffStore("diffset{set}", "my{set}", "mynew{set}");
Response<Long> r3deprecated = p.sdiffStore("diffset{set}deprecated", "my{set}", "mynew{set}");
Response<Long> r3 = p.sdiffstore("diffset{set}", "my{set}", "mynew{set}");
Response<Set<String>> r4 = p.smembers("diffset{set}");
Response<Set<String>> r5 = p.sinter("my{set}", "mynew{set}");
Response<Long> r6 = p.sinterstore("interset{set}", "my{set}", "mynew{set}");
Expand All @@ -547,6 +548,7 @@ public void clusterPipelineSet() {
p.sync();
assertEquals(Long.valueOf(4), r1.get());
assertEquals(diff, r2.get());
assertEquals(Long.valueOf(diff.size()), r3deprecated.get());
assertEquals(Long.valueOf(diff.size()), r3.get());
assertEquals(diff, r4.get());
assertEquals(inter, r5.get());
Expand Down

0 comments on commit 7090808

Please sign in to comment.