Commit fa4a231c authored by JessonChan's avatar JessonChan

duration change to second

parent 850dc59b
......@@ -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)
}
......
......@@ -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)
}
......
......@@ -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)
}
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment