Test will now flush everything before executing

This commit is contained in:
Jonathan Leibiusky
2010-08-24 15:29:59 -03:00
parent 94b7e1d511
commit 99f29abd7b
2 changed files with 3 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ public abstract class JedisCommandTestBase extends Assert {
jedis = new Jedis("localhost", Protocol.DEFAULT_PORT, 500);
jedis.connect();
jedis.auth("foobared");
jedis.flushDB();
jedis.flushAll();
}
@After

View File

@@ -59,8 +59,6 @@ public class TransactionCommandsTest extends JedisCommandTestBase {
@Test
public void watch() throws UnknownHostException, IOException {
jedis.watch("mykey");
String val = jedis.get("mykey");
val = "foo";
Transaction t = jedis.multi();
Jedis nj = new Jedis("localhost");
@@ -69,9 +67,10 @@ public class TransactionCommandsTest extends JedisCommandTestBase {
nj.set("mykey", "bar");
nj.disconnect();
t.set("mykey", val);
t.set("mykey", "foo");
List<Object> resp = t.exec();
assertEquals(null, resp);
assertEquals("bar", jedis.get("mykey"));
}
@Test