1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-14 19:30:39 +00:00

fix bee fix

This commit is contained in:
JessonChan
2016-03-25 13:25:29 +08:00
parent fa4a231cd4
commit e59271662c
4 changed files with 24 additions and 24 deletions

View File

@ -29,8 +29,8 @@ func TestMemcacheCache(t *testing.T) {
if err != nil {
t.Error("init err")
}
timeoutDuration := 10
if err = bm.Put("astaxie", "1", timeoutDuration*time.Second); err != nil {
timeoutDuration := 10 * time.Second
if err = bm.Put("astaxie", "1", timeoutDuration); err != nil {
t.Error("set Error", err)
}
if !bm.IsExist("astaxie") {
@ -42,7 +42,7 @@ func TestMemcacheCache(t *testing.T) {
if bm.IsExist("astaxie") {
t.Error("check err")
}
if err = bm.Put("astaxie", "1", timeoutDuration*time.Second); err != nil {
if err = bm.Put("astaxie", "1", timeoutDuration); err != nil {
t.Error("set Error", err)
}
@ -71,7 +71,7 @@ func TestMemcacheCache(t *testing.T) {
}
//test string
if err = bm.Put("astaxie", "author", timeoutDuration*time.Second); err != nil {
if err = bm.Put("astaxie", "author", timeoutDuration); err != nil {
t.Error("set Error", err)
}
if !bm.IsExist("astaxie") {
@ -83,7 +83,7 @@ func TestMemcacheCache(t *testing.T) {
}
//test GetMulti
if err = bm.Put("astaxie1", "author1", timeoutDuration*time.Second); err != nil {
if err = bm.Put("astaxie1", "author1", timeoutDuration); err != nil {
t.Error("set Error", err)
}
if !bm.IsExist("astaxie1") {