mirror of
https://github.com/astaxie/beego.git
synced 2025-06-11 09:50:39 +00:00
bee fix
This commit is contained in:
8
cache/ssdb/ssdb_test.go
vendored
8
cache/ssdb/ssdb_test.go
vendored
@ -19,7 +19,7 @@ func TestSsdbcacheCache(t *testing.T) {
|
||||
}
|
||||
timeoutDuration := 10 * time.Second
|
||||
//timeoutDuration := -10*time.Second if timeoutDuration is negtive,it means permanent
|
||||
if err = ssdb.Put("ssdb", "ssdb", timeoutDuration); err != nil {
|
||||
if err = ssdb.Put("ssdb", "ssdb", timeoutDuration*time.Second); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
if !ssdb.IsExist("ssdb") {
|
||||
@ -27,7 +27,7 @@ func TestSsdbcacheCache(t *testing.T) {
|
||||
}
|
||||
|
||||
// Get test done
|
||||
if err = ssdb.Put("ssdb", "ssdb", timeoutDuration); err != nil {
|
||||
if err = ssdb.Put("ssdb", "ssdb", timeoutDuration*time.Second); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ func TestSsdbcacheCache(t *testing.T) {
|
||||
}
|
||||
|
||||
//inc/dec test done
|
||||
if err = ssdb.Put("ssdb", "2", timeoutDuration); err != nil {
|
||||
if err = ssdb.Put("ssdb", "2", timeoutDuration*time.Second); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
if err = ssdb.Incr("ssdb"); err != nil {
|
||||
@ -52,7 +52,7 @@ func TestSsdbcacheCache(t *testing.T) {
|
||||
}
|
||||
|
||||
// test del
|
||||
if err = ssdb.Put("ssdb", "3", timeoutDuration); err != nil {
|
||||
if err = ssdb.Put("ssdb", "3", timeoutDuration*time.Second); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
if v, err := strconv.Atoi(ssdb.Get("ssdb").(string)); err != nil || v != 3 {
|
||||
|
Reference in New Issue
Block a user