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)