Commit cbcc7584 authored by Mikio Hara's avatar Mikio Hara

net: increase timeout in TestWriteTimeoutFluctuation on darwin/arm

On darwin/arm, the test sometimes fails with:

Process 557 resuming
--- FAIL: TestWriteTimeoutFluctuation (1.64s)
	timeout_test.go:706: Write took over 1s; expected 0.1s
FAIL
Process 557 exited with status = 1 (0x00000001)
go_darwin_arm_exec: timeout running tests

This change increaes timeout on iOS builders from 1s to 3s as a
temporarily fix.

Updates #10775.

Change-Id: Ifdaf99cf5b8582c1a636a0f7d5cc66bb276efd72
Reviewed-on: https://go-review.googlesource.com/9915Reviewed-by: 's avatarMinux Ma <minux@golang.org>
parent c8b31c5c
......@@ -696,14 +696,18 @@ func TestWriteTimeoutFluctuation(t *testing.T) {
}
defer c.Close()
max := time.NewTimer(time.Second)
d := time.Second
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
d = 3 * time.Second // see golang.org/issue/10775
}
max := time.NewTimer(d)
defer max.Stop()
ch := make(chan error)
go timeoutTransmitter(c, 100*time.Millisecond, 50*time.Millisecond, 250*time.Millisecond, ch)
select {
case <-max.C:
t.Fatal("Write took over 1s; expected 0.1s")
t.Fatalf("Write took over %v; expected 0.1s", d)
case err := <-ch:
if perr := parseWriteError(err); perr != nil {
t.Error(perr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment