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:
committed by
Hisham Mardam-Bey
parent
9b78d19dcf
commit
33e64bdb6e
@@ -299,8 +299,11 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void ttl() {
|
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");
|
long ttl = jedis.ttl("foo");
|
||||||
assertEquals(-2, ttl);
|
assertEquals(-1, ttl);
|
||||||
|
|
||||||
jedis.set("foo", "bar");
|
jedis.set("foo", "bar");
|
||||||
ttl = jedis.ttl("foo");
|
ttl = jedis.ttl("foo");
|
||||||
@@ -310,9 +313,13 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
|
|||||||
ttl = jedis.ttl("foo");
|
ttl = jedis.ttl("foo");
|
||||||
assertTrue(ttl >= 0 && ttl <= 20);
|
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
|
// Binary
|
||||||
long bttl = jedis.ttl(bfoo);
|
long bttl = jedis.ttl(bfoo);
|
||||||
assertEquals(-2, bttl);
|
assertEquals(-1, bttl);
|
||||||
|
|
||||||
jedis.set(bfoo, bbar);
|
jedis.set(bfoo, bbar);
|
||||||
bttl = jedis.ttl(bfoo);
|
bttl = jedis.ttl(bfoo);
|
||||||
@@ -503,4 +510,4 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
|
|||||||
assertTrue(pttl >= 0 && pttl <= 20000);
|
assertTrue(pttl >= 0 && pttl <= 20000);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user