new - dump and restore command
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -27,7 +27,11 @@ public abstract class JedisCommandTestBase extends JedisTestBase {
|
||||
public void setUp() throws Exception {
|
||||
jedis = new Jedis(hnp.host, hnp.port, 500);
|
||||
jedis.connect();
|
||||
try {
|
||||
jedis.auth("foobared");
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
}
|
||||
jedis.configSet("timeout", "300");
|
||||
jedis.flushAll();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user