修复部分测试用例

This commit is contained in:
GoEdgeLab
2023-06-07 21:49:42 +08:00
parent c782d92332
commit 58b7bbfbb5
14 changed files with 254 additions and 107 deletions

View File

@@ -4,6 +4,7 @@ package caches_test
import (
"github.com/TeaOSLab/EdgeNode/internal/caches"
"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
"testing"
"time"
)
@@ -23,7 +24,9 @@ func TestNewOpenFileCache_Close(t *testing.T) {
cache.Get("d.txt")
cache.Close("a.txt")
time.Sleep(100 * time.Second)
if testutils.IsSingleTesting() {
time.Sleep(100 * time.Second)
}
}
func TestNewOpenFileCache_CloseAll(t *testing.T) {