Search in sources :

Example 1 with BrPopLPushParser

use of org.apache.rocketmq.connect.redis.parser.BrPopLPushParser in project rocketmq-externals by apache.

the class ParserTest method testBrPopLPushParser.

@Test
public void testBrPopLPushParser() {
    String command = "BRPOPLPUSH source destination 500";
    KVEntry builder = new BrPopLPushParser().parse(parseCommand(command));
    Assert.assertEquals("BRPOPLPUSH", builder.getCommand());
    Assert.assertEquals("source", builder.getKey());
    Assert.assertEquals("destination", builder.getValue());
    Assert.assertTrue(500L == builder.getParam(Options.REDIS_TIMEOUT));
}
Also used : BrPopLPushParser(org.apache.rocketmq.connect.redis.parser.BrPopLPushParser) KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) Test(org.junit.Test)

Aggregations

BrPopLPushParser (org.apache.rocketmq.connect.redis.parser.BrPopLPushParser)1 KVEntry (org.apache.rocketmq.connect.redis.pojo.KVEntry)1 Test (org.junit.Test)1