From 42a601fbf26a7abb163470068477a93cde236c0c Mon Sep 17 00:00:00 2001 From: nielash Date: Mon, 22 Sep 2025 01:45:09 -0400 Subject: [PATCH] bisync: use t.TempDir() in tests to fix sporadic race #8815 --- cmd/bisync/bisync_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/bisync/bisync_test.go b/cmd/bisync/bisync_test.go index f7c05d5e8..3e7bbe7f2 100644 --- a/cmd/bisync/bisync_test.go +++ b/cmd/bisync/bisync_test.go @@ -330,7 +330,7 @@ func testBisync(ctx context.Context, t *testing.T, path1, path2 string) { baseDir, err := os.Getwd() require.NoError(t, err, "get current directory") randName := time.Now().Format("150405") + random.String(2) // some bucket backends don't like dots, keep this short to avoid linux errors - tempDir := filepath.Join(os.TempDir(), randName) + tempDir := filepath.Join(t.TempDir(), randName) workDir := filepath.Join(tempDir, "workdir") b := &bisyncTest{