1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-14 11:40:38 +00:00

Add ctx to session API

This commit is contained in:
Ming Deng
2020-08-30 15:39:07 +00:00
parent 0019e0fc1b
commit 670064686e
23 changed files with 302 additions and 288 deletions

View File

@ -129,7 +129,7 @@ func TestCache_Scan(t *testing.T) {
t.Error("init err")
}
// insert all
for i := 0; i < 10000; i++ {
for i := 0; i < 100; i++ {
if err = bm.Put(fmt.Sprintf("astaxie%d", i), fmt.Sprintf("author%d", i), timeoutDuration); err != nil {
t.Error("set Error", err)
}
@ -141,7 +141,7 @@ func TestCache_Scan(t *testing.T) {
t.Error("scan Error", err)
}
assert.Equal(t, 10000, len(keys), "scan all error")
assert.Equal(t, 100, len(keys), "scan all error")
// clear all
if err = bm.ClearAll(); err != nil {