LPUSH conversion position fixed. #280

pull/282/head
Nikita 9 years ago
parent 9174a33994
commit 1ea9161052

@ -113,7 +113,7 @@ public interface RedisCommands {
RedisStrictCommand<Void> PFMERGE = new RedisStrictCommand<Void>("PFMERGE", new VoidReplayConvertor());
RedisCommand<Long> RPOP = new RedisCommand<Long>("RPOP");
RedisCommand<Long> LPUSH = new RedisCommand<Long>("LPUSH");
RedisCommand<Long> LPUSH = new RedisCommand<Long>("LPUSH", 2);
RedisCommand<List<Object>> LRANGE = new RedisCommand<List<Object>>("LRANGE", new ObjectListReplayDecoder<Object>());
RedisCommand<Long> RPUSH = new RedisCommand<Long>("RPUSH", 2, ValueType.OBJECTS);
RedisCommand<Boolean> RPUSH_BOOLEAN = new RedisCommand<Boolean>("RPUSH", new TrueReplayConvertor(), 2, ValueType.OBJECTS);

@ -8,6 +8,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.Test;
@ -18,6 +19,15 @@ import io.netty.util.concurrent.FutureListener;
public class RedissonListTest extends BaseTest {
@Test
public void testAddByIndex() {
RList<String> test2 = redisson.getList("test2");
test2.add("foo");
test2.add(0, "bar");
MatcherAssert.assertThat(test2, Matchers.contains("bar", "foo"));
}
@Test
public void testAddAllAsync() throws InterruptedException {
final RList<Long> list = redisson.getList("list");

Loading…
Cancel
Save