Skip to content

Commit 97ad9d1

Browse files
committed
test(fscache): discard cleanup error
Flaky windows CI-runner has inconsistent test cleanup behaviour, hence we discard instead of failing.
1 parent 7408a82 commit 97ad9d1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

store/fscache/fscache_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package fscache
1717
import (
1818
"bytes"
1919
"context"
20+
"fmt"
2021
"io"
2122
"io/fs"
2223
"net/url"
@@ -30,7 +31,12 @@ import (
3031
"github.com/bartventer/httpcache/store/driver"
3132
)
3233

33-
func (c *fsCache) Close() error { return c.root.Close() }
34+
func (c *fsCache) Close() error {
35+
if err := c.root.Close(); err != nil {
36+
fmt.Printf("Warning: failed to close cache: %v", err)
37+
}
38+
return nil
39+
}
3440

3541
func makeRootURL(t testing.TB) *url.URL {
3642
t.Helper()

0 commit comments

Comments
 (0)