Commit 834028d5 authored by Shenghou Ma's avatar Shenghou Ma

net: fix timeout slack calculation

R=alex.brainman
CC=golang-dev
https://golang.org/cl/6816085
parent d8008a9e
......@@ -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)
}
......
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