]> Cypherpunks repositories - gostls13.git/commitdiff
os/exec: avoid flaky Wait in TestContextCancel
authorShuhei Takahashi <nya@chromium.org>
Mon, 22 Mar 2021 04:35:49 +0000 (13:35 +0900)
committerIan Lance Taylor <iant@golang.org>
Mon, 22 Mar 2021 18:41:13 +0000 (18:41 +0000)
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 <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Benny Siegert <bsiegert@gmail.com>

src/os/exec/exec_test.go

index 57591a38abba561e67e33305438103a73515529a..05cf807583f25e68be1f36360ceac22a2d87e3f9 100644 (file)
@@ -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)