aboutsummaryrefslogtreecommitdiff
path: root/src/net/timeout_test.go
diff options
context:
space:
mode:
authorMikio Hara <mikioh.mikioh@gmail.com>2015-05-10 23:11:04 +0900
committerMikio Hara <mikioh.mikioh@gmail.com>2015-05-11 06:03:40 +0000
commitcbcc7584de99dbefd3e019d2a53442b30d5af989 (patch)
treef60776b9ed2af16f8f385e2f31785fcb248d8cf5 /src/net/timeout_test.go
parentc8b31c5cea0ecdb7eec44752701a653c325688df (diff)
downloadgo-cbcc7584de99dbefd3e019d2a53442b30d5af989.tar.xz
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/9915 Reviewed-by: Minux Ma <minux@golang.org>
Diffstat (limited to 'src/net/timeout_test.go')
-rw-r--r--src/net/timeout_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/timeout_test.go b/src/net/timeout_test.go
index cafa3755f6..9688c21699 100644
--- a/src/net/timeout_test.go
+++ b/src/net/timeout_test.go
@@ -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)