mirror of
https://gitee.com/johng/gf.git
synced 2024-12-02 12:17:53 +08:00
improve unit testing case for package gcache
This commit is contained in:
parent
091df972f1
commit
d1b69142c4
@ -134,7 +134,7 @@ func TestCache_UpdateExpire(t *testing.T) {
|
||||
newExpire := 10 * time.Second
|
||||
oldExpire2, err := cache.UpdateExpire(ctx, 1, newExpire)
|
||||
t.AssertNil(err)
|
||||
t.Assert(oldExpire2, oldExpire)
|
||||
t.AssertIN(oldExpire2, g.Slice{oldExpire, `2.999s`})
|
||||
|
||||
e, _ := cache.GetExpire(ctx, 1)
|
||||
t.AssertNE(e, oldExpire)
|
||||
|
Loading…
Reference in New Issue
Block a user