|
|
|
net: try to deflake TestVariousDeadlines4Proc
Timeouts are only checked when the non-blocking
network read returns EAGAIN. If the writer is racing
far enough ahead of the reader, it is possible that the
reader may never catch up, and therefore never
reach the timeout check.
This theory is supported by the fact that it is always
the longer timeouts that fail in the build failures.
They give the writer more time to get ahead.
Sleeping in the writer should give the reader time
to catch up.
Patch Set 1 #Patch Set 2 : diff -r ef8878dbed3b https://code.google.com/p/go #Patch Set 3 : diff -r ef8878dbed3b https://code.google.com/p/go #Total messages: 3
|
rsc
Hello bradfitz, bradfitz@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
|
11 years, 7 months ago (2014年06月11日 01:00:30 UTC) #1 |
Hello bradfitz, bradfitz@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
LGTM Little comment in the code might be nice too. On Jun 10, 2014 6:00 PM, <rsc@golang.org> wrote: > Reviewers: bradfitz, > > Message: > Hello bradfitz, bradfitz@golang.org (cc: > golang-codereviews@googlegroups.com), > > I'd like you to review this change to > https://code.google.com/p/go > > > Description: > net: try to deflake TestVariousDeadlines4Proc > > Timeouts are only checked when the non-blocking > network read returns EAGAIN. If the writer is racing > far enough ahead of the reader, it is possible that the > reader may never catch up, and therefore never > reach the timeout check. > > This theory is supported by the fact that it is always > the longer timeouts that fail in the build failures. > They give the writer more time to get ahead. > > Sleeping in the writer should give the reader time > to catch up. > > Please review this at https://codereview.appspot.com/106950044/ > > Affected files (+1, -0 lines): > M src/pkg/net/timeout_test.go > > > Index: src/pkg/net/timeout_test.go > =================================================================== > --- a/src/pkg/net/timeout_test.go > +++ b/src/pkg/net/timeout_test.go > @@ -409,6 +409,7 @@ > for i := range p { > p[i] = byte(b) > } > + time.Sleep(1 * time.Millisecond) > return len(p), nil > } > > > >
R=close To the author of this CL: The Go project has moved to Gerrit Code Review. If this CL should be continued, please see the latest version of https://golang.org/doc/contribute.html for instructions on how to set up Git and the Go project's Gerrit codereview plugin, and then create a new change with your current code. If there has been discussion on this CL, please give a link to it (golang.org/cl/106950044 is best) in the description in your new CL. Thanks very much.