Added bunch of missing commands and a test to check if Jedis is updated

This commit is contained in:
Jonathan Leibiusky
2010-09-14 12:08:56 -03:00
parent 9b202c3fb1
commit a8ffacd30a
7 changed files with 179 additions and 2 deletions

View File

@@ -219,4 +219,20 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
jedis.select(1);
assertEquals(0, jedis.dbSize());
}
@Test
public void persist() {
jedis.setex("foo", 60 * 60, "bar");
assertTrue(jedis.ttl("foo") > 0);
int status = jedis.persist("foo");
assertEquals(1, status);
assertEquals(-1, jedis.ttl("foo"));
}
@Test
public void echo() {
String result = jedis.echo("hello world");
assertEquals("hello world", result);
}
}