Support null sortParams in Lettuce and SRP sort
DATAREDIS-217
This commit is contained in:
@@ -712,6 +712,17 @@ public abstract class AbstractConnectionIntegrationTests {
|
||||
Arrays.asList(new String[] { "bar", "baz", "foo" }) }), actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSortNullParams() {
|
||||
actual.add(connection.rPush("sortlist", "5"));
|
||||
actual.add(connection.rPush("sortlist", "2"));
|
||||
actual.add(connection.rPush("sortlist", "3"));
|
||||
actual.add(connection.sort("sortlist", null));
|
||||
verifyResults(
|
||||
Arrays.asList(new Object[] { 1l, 2l, 3l,
|
||||
Arrays.asList(new String[] { "2", "3", "5" }) }), actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDbSize() {
|
||||
connection.set("dbparam", "foo");
|
||||
|
||||
@@ -83,6 +83,10 @@ public class JedisConnectionPipelineIntegrationTests extends
|
||||
public void testSortStore() {
|
||||
}
|
||||
|
||||
@Ignore("DATAREDIS-143 Pipeline tries to return Long instead of List<String> on sort with no params")
|
||||
public void testSortNullParams() {
|
||||
}
|
||||
|
||||
@Ignore("DATAREDIS-143 Jedis ClassCastExceptions closing pipeline on certain ops")
|
||||
public void testMultiExec() {
|
||||
}
|
||||
|
||||
@@ -543,6 +543,16 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
|
||||
assertEquals(Arrays.asList(new String[] { "bar", "baz", "foo" }), connection.lRange("newlist", 0, 9));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSortNullParams() {
|
||||
connection.rPush("sortlist", "5");
|
||||
connection.rPush("sortlist", "2");
|
||||
connection.rPush("sortlist", "3");
|
||||
actual.add(connection.sort("sortlist", null));
|
||||
verifyResults(
|
||||
Arrays.asList(new Object[] { Arrays.asList(new String[] { "2", "3", "5" }) }), actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLPop() {
|
||||
connection.rPush("PopList", "hello");
|
||||
|
||||
Reference in New Issue
Block a user