mirror of
https://github.com/golang/go.git
synced 2025-11-11 22:21:06 +00:00
net: fix timeout slack calculation
R=alex.brainman CC=golang-dev https://golang.org/cl/6816085
This commit is contained in:
parent
d8008a9eef
commit
834028d527
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue