fix tests, since ttl now return -2 or -1 depending if the key exists

already
This commit is contained in:
Jonathan Leibiusky
2013-01-30 10:41:12 -03:00
parent 258ac300fc
commit 406d52b271

View File

@@ -300,7 +300,7 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
@Test
public void ttl() {
long ttl = jedis.ttl("foo");
assertEquals(-1, ttl);
assertEquals(-2, ttl);
jedis.set("foo", "bar");
ttl = jedis.ttl("foo");
@@ -312,7 +312,7 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
// Binary
long bttl = jedis.ttl(bfoo);
assertEquals(-1, bttl);
assertEquals(-2, bttl);
jedis.set(bfoo, bbar);
bttl = jedis.ttl(bfoo);