1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-10 05:13:45 +00:00

bisync: use t.TempDir() in tests to fix sporadic race #8815

This commit is contained in:
nielash
2025-09-22 01:45:09 -04:00
committed by Nick Craig-Wood
parent 9b5e6a7e91
commit 42a601fbf2

View File

@@ -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{