new - dump and restore command

This commit is contained in:
mindwind
2013-06-29 14:17:44 +08:00
parent 7b6006b669
commit 8b3ea5f2de
8 changed files with 55 additions and 5 deletions

View File

@@ -103,6 +103,14 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
reply = jedis.del(bfoo1, bfoo2);
assertEquals(0, reply);
}
@Test
public void dumpAndRestore() {
jedis.set("foo1", "bar1");
byte[] sv = jedis.dump("foo1");
jedis.restore("foo2", 0, sv);
assertTrue(jedis.exists("foo2"));
}
@Test
public void type() {