From 04683f2032e221ae9a4b8d22c0b9e31555ba4170 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 28 Aug 2025 17:06:43 +0100 Subject: [PATCH] fstest: stop errors in test cleanup changing the global stats This was causing the concurrent bisync tests to fail every now and again. --- fstest/fstest.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fstest/fstest.go b/fstest/fstest.go index 794362b64..e2a594011 100644 --- a/fstest/fstest.go +++ b/fstest/fstest.go @@ -482,7 +482,9 @@ func RandomRemote() (fs.Fs, string, func(), error) { // // It logs errors rather than returning them func Purge(f fs.Fs) { - ctx := context.Background() + // Create a stats group here so errors in the cleanup don't + // interfere with the global stats. + ctx := accounting.WithStatsGroup(context.Background(), "test-cleanup") var err error doFallbackPurge := true if doPurge := f.Features().Purge; doPurge != nil {