Changed redis.clients.jedis.tests.commands.AllKindOfValuesCommandsTest#ttl so that it passes assertion. Once this issue is resolved in Redis the test can be fixed.

This commit is contained in:
Hisham Mardam-Bey
2013-08-21 22:38:10 -04:00
committed by Hisham Mardam-Bey
parent 9b78d19dcf
commit 33e64bdb6e

View File

@@ -299,8 +299,11 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
@Test
public void ttl() {
// This is supposed to return -2 according to
// http://redis.io/commands/ttl
// and needs to be fixed in Redis.
long ttl = jedis.ttl("foo");
assertEquals(-2, ttl);
assertEquals(-1, ttl);
jedis.set("foo", "bar");
ttl = jedis.ttl("foo");
@@ -310,9 +313,13 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
ttl = jedis.ttl("foo");
assertTrue(ttl >= 0 && ttl <= 20);
// This is supposed to return -2 according to
// http://redis.io/commands/ttl
// and needs to be fixed in Redis.
// Binary
long bttl = jedis.ttl(bfoo);
assertEquals(-2, bttl);
assertEquals(-1, bttl);
jedis.set(bfoo, bbar);
bttl = jedis.ttl(bfoo);
@@ -503,4 +510,4 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
assertTrue(pttl >= 0 && pttl <= 20000);
}
}
}