Commit feb509c7 authored by Mikio Hara's avatar Mikio Hara

net: make TestDialTimeoutFDLeak a bit robust

TestDialTimeoutFDLeak will fail when system state somaxconn is
greater than expected fixed value.

Fixes #4384 (again).

R=fullung, dave, rsc
CC=golang-dev
https://golang.org/cl/6873069
parent b978995f
......@@ -241,7 +241,7 @@ func TestDialTimeoutFDLeak(t *testing.T) {
}
dials := listenerBacklog + 100
// used to be listenerBacklog + 5, but was found to be unreliable, issue 4384.
maxGoodConnect := 150
maxGoodConnect := listenerBacklog + runtime.NumCPU()*10
resc := make(chan connErr)
for i := 0; i < dials; i++ {
go func() {
......
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