enable parallel execution for cache tests
All checks were successful
CI / Lint (push) Successful in 7s
CI / Build (push) Successful in 15s
CI / Test (push) Successful in 58s

This commit is contained in:
2025-01-21 12:27:49 -06:00
parent 9d0a09d8be
commit 22f9196960

View File

@@ -15,6 +15,8 @@ func testMemory() vfs.VFS {
}
func TestNew(t *testing.T) {
t.Parallel()
fast := testMemory()
slow := testMemory()
@@ -25,6 +27,8 @@ func TestNew(t *testing.T) {
}
func TestNewPanics(t *testing.T) {
t.Parallel()
defer func() {
if r := recover(); r == nil {
t.Fatal("expected panic but did not get one")
@@ -35,6 +39,8 @@ func TestNewPanics(t *testing.T) {
}
func TestSetAndGet(t *testing.T) {
t.Parallel()
fast := testMemory()
slow := testMemory()
cache := New(fast, slow, nil)
@@ -57,6 +63,8 @@ func TestSetAndGet(t *testing.T) {
}
func TestSetAndGetNoFast(t *testing.T) {
t.Parallel()
slow := testMemory()
cache := New(nil, slow, nil)
@@ -77,6 +85,8 @@ func TestSetAndGetNoFast(t *testing.T) {
}
}
func TestCaching(t *testing.T) {
t.Parallel()
fast := testMemory()
slow := testMemory()
cache := New(fast, slow, func(fi *vfs.FileInfo, cs cachestate.CacheState) bool {
@@ -134,6 +144,8 @@ func TestCaching(t *testing.T) {
}
func TestGetNotFound(t *testing.T) {
t.Parallel()
fast := testMemory()
slow := testMemory()
cache := New(fast, slow, nil)
@@ -145,6 +157,8 @@ func TestGetNotFound(t *testing.T) {
}
func TestDelete(t *testing.T) {
t.Parallel()
fast := testMemory()
slow := testMemory()
cache := New(fast, slow, nil)
@@ -167,6 +181,8 @@ func TestDelete(t *testing.T) {
}
func TestStat(t *testing.T) {
t.Parallel()
fast := testMemory()
slow := testMemory()
cache := New(fast, slow, nil)