mirror of
https://github.com/astaxie/beego.git
synced 2025-06-11 09:20:39 +00:00
fix bee fix
This commit is contained in:
10
cache/redis/redis_test.go
vendored
10
cache/redis/redis_test.go
vendored
@ -27,8 +27,8 @@ func TestRedisCache(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") {
|
||||
@ -40,7 +40,7 @@ func TestRedisCache(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)
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ func TestRedisCache(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") {
|
||||
@ -81,7 +81,7 @@ func TestRedisCache(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") {
|
||||
|
Reference in New Issue
Block a user