use of org.apache.rocketmq.connect.redis.parser.ExpireParser in project rocketmq-externals by apache.
the class ParserTest method testExpireParser.
@Test
public void testExpireParser() {
String command = "expire key 500";
KVEntry builder = new ExpireParser().parse(parseCommand(command));
Assert.assertEquals("expire", builder.getCommand());
Assert.assertEquals("key", builder.getKey());
Assert.assertTrue(500L == builder.getParam(Options.EXPIRED_TIME));
Assert.assertEquals(ExpiredType.SECOND, builder.getParam(Options.EXPIRED_TYPE));
}
Aggregations