From: Shuhei Takahashi Date: Mon, 22 Mar 2021 04:35:49 +0000 (+0900) Subject: os/exec: avoid flaky Wait in TestContextCancel X-Git-Tag: go1.17beta1~1029 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ba6b8e75ed;p=gostls13.git os/exec: avoid flaky Wait in TestContextCancel This change just increases the timeout to 1 minute to avoid test flakiness. Fixes #42061 Change-Id: Id258488ee8f062cd5e68b68bb5cf11e15fdbb396 Reviewed-on: https://go-review.googlesource.com/c/go/+/303351 Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor Trust: Benny Siegert --- diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go index 57591a38ab..05cf807583 100644 --- a/src/os/exec/exec_test.go +++ b/src/os/exec/exec_test.go @@ -1099,7 +1099,7 @@ func TestContextCancel(t *testing.T) { if _, err := io.WriteString(w, "echo"); err != nil { break } - if time.Since(start) > time.Second { + if time.Since(start) > time.Minute { t.Fatal("canceling context did not stop program") } time.Sleep(time.Millisecond)