mirror of
https://github.com/golang/go
synced 2024-11-12 06:20:22 -07:00
net: during short test, don't bother timeout longer than expected
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5716053
This commit is contained in:
parent
6a005cb03f
commit
a3caf073a5
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user