Search in sources :

Example 1 with PExpireAtParser

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

the class ParserTest method testPExpireAtParser.

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

Aggregations

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