From 5ce968006c3873a6bc32dd569624c74f9ff50604 Mon Sep 17 00:00:00 2001 From: holys Date: Mon, 11 Aug 2014 10:10:36 +0800 Subject: [PATCH] update test --- tools/redis_import/test.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tools/redis_import/test.py b/tools/redis_import/test.py index 4e77efc..f60ee7d 100644 --- a/tools/redis_import/test.py +++ b/tools/redis_import/test.py @@ -120,18 +120,12 @@ def ledis_ttl(ledis_client, key, k_type): def test_ttl(): keys, total = scan(rds, 1000) - invalid = [] for key in keys: k_type = rds.type(key) - rds.expire(key, 100) + rds.expire(key, (60 * 60 * 24)) set_ttl(rds, lds, key, k_type) - # if rds.ttl(key) != ledis_ttl(lds, key, k_type): - # print key - # print rds.ttl(key) - # print ledis_ttl(lds, key, k_type) - # invalid.append(key) - - assert rds.ttl(key) == ledis_ttl(lds, key, k_type) + if rds.ttl(key): + assert ledis_ttl(lds, key, k_type) > 0 if __name__ == "__main__": test()