From 3c3b76cea182bbe89c0eb54919b6093d76d65fc5 Mon Sep 17 00:00:00 2001 From: Siyuan Zhang Date: Fri, 19 Apr 2024 09:35:26 -0700 Subject: [PATCH] robustness: not overwrite results dir by giving each dir a unique name. Signed-off-by: Siyuan Zhang --- tests/robustness/report/report.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/robustness/report/report.go b/tests/robustness/report/report.go index a84a3d163..778017d6c 100644 --- a/tests/robustness/report/report.go +++ b/tests/robustness/report/report.go @@ -20,6 +20,7 @@ import ( "path/filepath" "strings" "testing" + "time" "go.uber.org/zap" @@ -42,7 +43,8 @@ func testResultsDirectory(t *testing.T) string { if err != nil { panic(err) } - path, err := filepath.Abs(filepath.Join(resultsDirectory, strings.ReplaceAll(t.Name(), "/", "_"))) + path, err := filepath.Abs(filepath.Join( + resultsDirectory, strings.ReplaceAll(t.Name(), "/", "_"), fmt.Sprintf("%v", time.Now().UnixNano()))) if err != nil { t.Fatal(err) }