Search in sources :

Example 1 with PExpireParser

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

the class ParserTest method testPExpireParser.

@Test
public void testPExpireParser() {
    String command = "PExpire key 3600";
    KVEntry builder = new PExpireParser().parse(parseCommand(command));
    Assert.assertEquals("PExpire", builder.getCommand());
    Assert.assertEquals("key", builder.getKey());
    Assert.assertTrue(3600L == builder.getParam(Options.REDIS_PX));
}
Also used : KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) PExpireParser(org.apache.rocketmq.connect.redis.parser.PExpireParser) Test(org.junit.Test)

Aggregations

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