🚤 Improve memory storage

This commit is contained in:
kiyon
2020-11-06 09:32:50 +08:00
parent 4ac8cc184b
commit 5c5de159d0
2 changed files with 27 additions and 8 deletions

View File

@@ -115,3 +115,11 @@ func Test_Memory_Clear(t *testing.T) {
utils.AssertEqual(t, ErrNotExist, err)
utils.AssertEqual(t, true, len(result) == 0)
}
func Test_Memory_Close(t *testing.T) {
s := Storage{done: make(chan struct{}, 1)}
err := s.Close()
utils.AssertEqual(t, nil, err)
utils.AssertEqual(t, 1, len(s.done))
}