diff --git a/src/test/java/redis/clients/jedis/tests/commands/SortedSetCommandsTest.java b/src/test/java/redis/clients/jedis/tests/commands/SortedSetCommandsTest.java index 0ff1a8258d..fb7949fe3a 100644 --- a/src/test/java/redis/clients/jedis/tests/commands/SortedSetCommandsTest.java +++ b/src/test/java/redis/clients/jedis/tests/commands/SortedSetCommandsTest.java @@ -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 hash = new HashMap<>(); hash.put("bar1", 1d); @@ -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 bhash = new HashMap<>(); bhash.put(bbar1, 1d); bhash.put(bbar2, 10d);