mirror of
https://github.com/astaxie/beego.git
synced 2025-06-11 08:30:40 +00:00
bee fix
This commit is contained in:
8
cache/redis/redis_test.go
vendored
8
cache/redis/redis_test.go
vendored
@ -29,7 +29,7 @@ func TestRedisCache(t *testing.T) {
|
||||
t.Error("init err")
|
||||
}
|
||||
timeoutDuration := 10 * time.Second
|
||||
if err = bm.Put("astaxie", 1, timeoutDuration); err != nil {
|
||||
if err = bm.Put("astaxie", 1, timeoutDuration*time.Second); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
if !bm.IsExist("astaxie") {
|
||||
@ -41,7 +41,7 @@ func TestRedisCache(t *testing.T) {
|
||||
if bm.IsExist("astaxie") {
|
||||
t.Error("check err")
|
||||
}
|
||||
if err = bm.Put("astaxie", 1, timeoutDuration); err != nil {
|
||||
if err = bm.Put("astaxie", 1, timeoutDuration*time.Second); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ func TestRedisCache(t *testing.T) {
|
||||
}
|
||||
|
||||
//test string
|
||||
if err = bm.Put("astaxie", "author", timeoutDuration); err != nil {
|
||||
if err = bm.Put("astaxie", "author", timeoutDuration*time.Second); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
if !bm.IsExist("astaxie") {
|
||||
@ -82,7 +82,7 @@ func TestRedisCache(t *testing.T) {
|
||||
}
|
||||
|
||||
//test GetMulti
|
||||
if err = bm.Put("astaxie1", "author1", timeoutDuration); err != nil {
|
||||
if err = bm.Put("astaxie1", "author1", timeoutDuration*time.Second); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
if !bm.IsExist("astaxie1") {
|
||||
|
Reference in New Issue
Block a user