From: Shenghou Ma Date: Fri, 2 Mar 2012 16:50:18 +0000 (+0800) Subject: net: during short test, don't bother timeout longer than expected X-Git-Tag: weekly.2012-03-04~29 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a3caf073a584a17eb0a7a17e1ce2ec014bae9a5c;p=gostls13.git net: during short test, don't bother timeout longer than expected R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5716053 --- diff --git a/src/pkg/net/timeout_test.go b/src/pkg/net/timeout_test.go index bae37c86b2..ef350f0f94 100644 --- a/src/pkg/net/timeout_test.go +++ b/src/pkg/net/timeout_test.go @@ -40,7 +40,7 @@ func testTimeout(t *testing.T, network, addr string, readFrom bool) { errc <- fmt.Errorf("fd.%s on %s %s did not return 0, timeout: %v, %v", what, network, addr, n, err1) return } - if dt := t1.Sub(t0); dt < 50*time.Millisecond || dt > 250*time.Millisecond { + if dt := t1.Sub(t0); dt < 50*time.Millisecond || !testing.Short() && dt > 250*time.Millisecond { errc <- fmt.Errorf("fd.%s on %s %s took %s, expected 0.1s", what, network, addr, dt) return }