Skip to content

Commit

Permalink
internal/cmdtest: increase the cli command test timeout
Browse files Browse the repository at this point in the history
The current timeout is 5s which is not enough when running tests with race
detector. Increase that timeout to 15s.
  • Loading branch information
minh-bq committed Oct 21, 2024
1 parent 1640b41 commit c8593e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cmdtest/test_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (tt *TestCmd) Run(name string, args ...string) {
// InputLine writes the given text to the child's stdin.
// This method can also be called from an expect template, e.g.:
//
// geth.expect(`Passphrase: {{.InputLine "password"}}`)
// geth.expect(`Passphrase: {{.InputLine "password"}}`)
func (tt *TestCmd) InputLine(s string) string {
io.WriteString(tt.stdin, s+"\n")
return ""
Expand Down Expand Up @@ -238,7 +238,7 @@ func (tt *TestCmd) Kill() {
}

func (tt *TestCmd) withKillTimeout(fn func()) {
timeout := time.AfterFunc(5*time.Second, func() {
timeout := time.AfterFunc(15*time.Second, func() {
tt.Log("killing the child process (timeout)")
tt.Kill()
})
Expand Down

0 comments on commit c8593e7

Please sign in to comment.