单元测试优化
This commit is contained in:
+5
-5
@@ -11,10 +11,10 @@ import (
|
|||||||
func TestCache(t *testing.T) {
|
func TestCache(t *testing.T) {
|
||||||
cachex.NewCache().Set("test", "test", time.Second*5)
|
cachex.NewCache().Set("test", "test", time.Second*5)
|
||||||
|
|
||||||
da := cachex.NewCache().Get("test")
|
da, err := cachex.NewCache().Get("test")
|
||||||
fmt.Println(da)
|
fmt.Println(da, err)
|
||||||
|
|
||||||
time.Sleep(time.Second *5)
|
time.Sleep(time.Second * 5)
|
||||||
da = cachex.NewCache().Get("test")
|
da, err = cachex.NewCache().Get("test")
|
||||||
fmt.Println(da)
|
fmt.Println(da, err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user