Skip to content

Commit

Permalink
Adjust ZRANDMEMBER test (#2578)
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Jul 8, 2021
1 parent 256e613 commit 3020133
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1568,8 +1568,8 @@ public void zdiffStore() {
@Test
public void zrandmember() {
assertNull(jedis.zrandmember("foo"));
assertNull(jedis.zrandmember("foo", 1));
assertNull(jedis.zrandmemberWithScores("foo", 1));
assertEquals(Collections.emptySet(), jedis.zrandmember("foo", 1));
assertEquals(Collections.emptySet(), jedis.zrandmemberWithScores("foo", 1));

Map<String, Double> hash = new HashMap<>();
hash.put("bar1", 1d);
Expand All @@ -1587,6 +1587,10 @@ public void zrandmember() {
assertEquals(hash.get(tuple.getElement()), Double.valueOf(tuple.getScore()));

// Binary
assertNull(jedis.zrandmember(bfoo));
assertEquals(Collections.emptySet(), jedis.zrandmember(bfoo, 1));
assertEquals(Collections.emptySet(), jedis.zrandmemberWithScores(bfoo, 1));

Map<byte[], Double> bhash = new HashMap<>();
bhash.put(bbar1, 1d);
bhash.put(bbar2, 10d);
Expand Down

0 comments on commit 3020133

Please sign in to comment.