From fa4a231cd4248e80a08ef7965be0b0c421bf8784 Mon Sep 17 00:00:00 2001 From: JessonChan Date: Fri, 25 Mar 2016 11:46:19 +0800 Subject: [PATCH] duration change to second --- cache/cache_test.go | 4 ++-- cache/memcache/memcache_test.go | 2 +- cache/redis/redis_test.go | 4 ++-- cache/ssdb/ssdb_test.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cache/cache_test.go b/cache/cache_test.go index 40a9d60a..ec344cb1 100644 --- a/cache/cache_test.go +++ b/cache/cache_test.go @@ -25,7 +25,7 @@ func TestCache(t *testing.T) { if err != nil { t.Error("init err") } - timeoutDuration := 10 * time.Second + timeoutDuration := 10 if err = bm.Put("astaxie", 1, timeoutDuration*time.Second); err != nil { t.Error("set Error", err) } @@ -102,7 +102,7 @@ func TestFileCache(t *testing.T) { if err != nil { t.Error("init err") } - timeoutDuration := 10 * time.Second + timeoutDuration := 10 if err = bm.Put("astaxie", 1, timeoutDuration*time.Second); err != nil { t.Error("set Error", err) } diff --git a/cache/memcache/memcache_test.go b/cache/memcache/memcache_test.go index ce16f066..9b9582f7 100644 --- a/cache/memcache/memcache_test.go +++ b/cache/memcache/memcache_test.go @@ -29,7 +29,7 @@ func TestMemcacheCache(t *testing.T) { if err != nil { t.Error("init err") } - timeoutDuration := 10 * time.Second + timeoutDuration := 10 if err = bm.Put("astaxie", "1", timeoutDuration*time.Second); err != nil { t.Error("set Error", err) } diff --git a/cache/redis/redis_test.go b/cache/redis/redis_test.go index e7aa78cb..91efbb3e 100644 --- a/cache/redis/redis_test.go +++ b/cache/redis/redis_test.go @@ -18,8 +18,8 @@ import ( "testing" "time" - "github.com/garyburd/redigo/redis" "github.com/astaxie/beego/cache" + "github.com/garyburd/redigo/redis" ) func TestRedisCache(t *testing.T) { @@ -27,7 +27,7 @@ func TestRedisCache(t *testing.T) { if err != nil { t.Error("init err") } - timeoutDuration := 10 * time.Second + timeoutDuration := 10 if err = bm.Put("astaxie", 1, timeoutDuration*time.Second); err != nil { t.Error("set Error", err) } diff --git a/cache/ssdb/ssdb_test.go b/cache/ssdb/ssdb_test.go index 8083f52d..4fea6fd8 100644 --- a/cache/ssdb/ssdb_test.go +++ b/cache/ssdb/ssdb_test.go @@ -18,7 +18,7 @@ func TestSsdbcacheCache(t *testing.T) { if ssdb.IsExist("ssdb") { t.Error("check err") } - timeoutDuration := 10 * time.Second + timeoutDuration := 10 //timeoutDuration := -10*time.Second if timeoutDuration is negtive,it means permanent if err = ssdb.Put("ssdb", "ssdb", timeoutDuration*time.Second); err != nil { t.Error("set Error", err)