优化测试用例

This commit is contained in:
刘祥超
2023-10-04 14:56:26 +08:00
parent 7a1fff8504
commit 263acb775b

View File

@@ -28,7 +28,9 @@ func TestNewCache(t *testing.T) {
} }
} }
t.Log("a:", cache.Read("a")) t.Log("a:", cache.Read("a"))
if testutils.IsSingleTesting() {
time.Sleep(5 * time.Second) time.Sleep(5 * time.Second)
}
for i := 0; i < len(cache.pieces); i++ { for i := 0; i < len(cache.pieces); i++ {
cache.GC() cache.GC()