]> Cypherpunks repositories - gostls13.git/commitdiff
net: TestDialTimeoutFDLeak failure
authorDave Cheney <dave@cheney.net>
Tue, 11 Dec 2012 20:25:07 +0000 (07:25 +1100)
committerDave Cheney <dave@cheney.net>
Tue, 11 Dec 2012 20:25:07 +0000 (07:25 +1100)
Fixes #4384.

Implments the suggestion by rsc in comment 15, http://code.google.com/p/go/issues/detail?id=4384#c15

An alternate suggestion would be to temporarily set GOMAXPROCS to 1 during this test.

R=fullung, rsc
CC=golang-dev
https://golang.org/cl/6923046

src/pkg/net/dial_test.go

index 34a15f27b1ac3b0d89b053d0243044ffff75d436..3241f34cf07dadc4cbff016b406b63c8f5bd19db 100644 (file)
@@ -240,7 +240,8 @@ func TestDialTimeoutFDLeak(t *testing.T) {
                err  error
        }
        dials := listenerBacklog + 100
-       maxGoodConnect := listenerBacklog + 5 // empirically 131 good ones (of 128). who knows?
+       // used to be listenerBacklog + 5, but was found to be unreliable, issue 4384.
+       maxGoodConnect := 150
        resc := make(chan connErr)
        for i := 0; i < dials; i++ {
                go func() {