mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
robustness: not overwrite results dir by giving each dir a unique name.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
This commit is contained in:
parent
e246bb8d4d
commit
3c3b76cea1
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user