Search in sources :

Example 1 with ExpireAtParser

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

the class ParserTest method testExpireAtParser.

@Test
public void testExpireAtParser() {
    String command = "expireat 500";
    KVEntry builder = new ExpireAtParser().parse(parseCommand(command));
    Assert.assertEquals("expireat", builder.getCommand());
    Assert.assertEquals("500", builder.getKey());
    Assert.assertTrue(500 == builder.getParam(Options.REDIS_EX_TIMESTAMP));
}
Also used : KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) ExpireAtParser(org.apache.rocketmq.connect.redis.parser.ExpireAtParser) PExpireAtParser(org.apache.rocketmq.connect.redis.parser.PExpireAtParser) Test(org.junit.Test)

Aggregations

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