Test will now flush everything before executing
This commit is contained in:
@@ -24,7 +24,7 @@ public abstract class JedisCommandTestBase extends Assert {
|
|||||||
jedis = new Jedis("localhost", Protocol.DEFAULT_PORT, 500);
|
jedis = new Jedis("localhost", Protocol.DEFAULT_PORT, 500);
|
||||||
jedis.connect();
|
jedis.connect();
|
||||||
jedis.auth("foobared");
|
jedis.auth("foobared");
|
||||||
jedis.flushDB();
|
jedis.flushAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ public class TransactionCommandsTest extends JedisCommandTestBase {
|
|||||||
@Test
|
@Test
|
||||||
public void watch() throws UnknownHostException, IOException {
|
public void watch() throws UnknownHostException, IOException {
|
||||||
jedis.watch("mykey");
|
jedis.watch("mykey");
|
||||||
String val = jedis.get("mykey");
|
|
||||||
val = "foo";
|
|
||||||
Transaction t = jedis.multi();
|
Transaction t = jedis.multi();
|
||||||
|
|
||||||
Jedis nj = new Jedis("localhost");
|
Jedis nj = new Jedis("localhost");
|
||||||
@@ -69,9 +67,10 @@ public class TransactionCommandsTest extends JedisCommandTestBase {
|
|||||||
nj.set("mykey", "bar");
|
nj.set("mykey", "bar");
|
||||||
nj.disconnect();
|
nj.disconnect();
|
||||||
|
|
||||||
t.set("mykey", val);
|
t.set("mykey", "foo");
|
||||||
List<Object> resp = t.exec();
|
List<Object> resp = t.exec();
|
||||||
assertEquals(null, resp);
|
assertEquals(null, resp);
|
||||||
|
assertEquals("bar", jedis.get("mykey"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user