Skip to content

Commit

Permalink
new timeout mechanisum
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhiminHeGit committed Sep 23, 2019
1 parent 320c40f commit a0c64b6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/btfs/functest.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ func add_functest(btfsBinaryPath string) error {

cmd := exec.Command(btfsBinaryPath, "id")

out, err := cmd.Output()
if err != nil {
return errors.New(fmt.Sprintf("btfs add test: btfs id failed: [%v], Out[%s]", err, string(out)))
}

// add current time stamp to file content so every time adding-file hash is different
currentTime := time.Now().String()
out = append(out, currentTime...)
Expand All @@ -102,10 +107,6 @@ func add_functest(btfsBinaryPath string) error {
}
}
}()
out, err := cmd.Output()
if err != nil {
return errors.New(fmt.Sprintf("btfs add test: btfs id failed: [%v], Out[%s]", err, string(out)))
}

out, err = cmd.Output()
if err != nil {
Expand Down

0 comments on commit a0c64b6

Please sign in to comment.