1
0
mirror of https://github.com/golang/go synced 2024-10-03 03:21:22 -06:00

net: fix timeout slack calculation

R=alex.brainman
CC=golang-dev
https://golang.org/cl/6816085
This commit is contained in:
Shenghou Ma 2012-11-04 18:07:59 +08:00
parent d8008a9eef
commit 834028d527

View File

@ -164,7 +164,7 @@ func TestReadWriteDeadline(t *testing.T) {
)
checkTimeout := func(command string, start time.Time, should time.Duration) {
is := time.Now().Sub(start)
d := should - is
d := is - should
if d < -30*time.Millisecond || !testing.Short() && 150*time.Millisecond < d {
t.Errorf("%s timeout test failed: is=%v should=%v\n", command, is, should)
}