mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net: deflake TestDialTimeout
Fixes #3867. Fixes #3307. R=bradfitz, dvyukov CC=golang-dev https://golang.org/cl/7735044
This commit is contained in:
parent
76959e2cc6
commit
cdc642453b
1 changed files with 7 additions and 1 deletions
|
|
@ -28,12 +28,18 @@ func newLocalListener(t *testing.T) Listener {
|
|||
}
|
||||
|
||||
func TestDialTimeout(t *testing.T) {
|
||||
origBacklog := listenerBacklog
|
||||
defer func() {
|
||||
listenerBacklog = origBacklog
|
||||
}()
|
||||
listenerBacklog = 1
|
||||
|
||||
ln := newLocalListener(t)
|
||||
defer ln.Close()
|
||||
|
||||
errc := make(chan error)
|
||||
|
||||
numConns := listenerBacklog + 10
|
||||
numConns := listenerBacklog + 100
|
||||
|
||||
// TODO(bradfitz): It's hard to test this in a portable
|
||||
// way. This is unfortunate, but works for now.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue