aboutsummaryrefslogtreecommitdiff
path: root/src/net/dial_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-12-08 07:07:45 -0800
committerIan Lance Taylor <iant@golang.org>2017-12-08 17:52:42 +0000
commit98d0da98da7ff26d59e478e6baa16bf4eb9d266c (patch)
tree000d46d7f9087ebf01012d6511c0dc65b43c813c /src/net/dial_test.go
parent25363de2266a3b53204065637eb509a8cc4d72c3 (diff)
downloadgo-98d0da98da7ff26d59e478e6baa16bf4eb9d266c.tar.gz
go-98d0da98da7ff26d59e478e6baa16bf4eb9d266c.zip
net: increase timeout for TestDialerDualStackFDLeak
This test has been getting occasional timeouts on the race builder. The point of the test is whether a file descriptor leaks, not whether the connection occurs in a certain amount of time. So use a very large timeout. The connection is normally fast and the timeout doesn't matter. Updates #13324 Change-Id: Ie1051c4a0be1fca4e63b1277101770be0cdae512 Reviewed-on: https://go-review.googlesource.com/82916 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/dial_test.go')
-rw-r--r--src/net/dial_test.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/net/dial_test.go b/src/net/dial_test.go
index 13fa9faacb..b3535dca39 100644
--- a/src/net/dial_test.go
+++ b/src/net/dial_test.go
@@ -85,11 +85,6 @@ func TestDialerDualStackFDLeak(t *testing.T) {
t.Skip("both IPv4 and IPv6 are required")
}
- closedPortDelay, expectClosedPortDelay := dialClosedPort()
- if closedPortDelay > expectClosedPortDelay {
- t.Errorf("got %v; want <= %v", closedPortDelay, expectClosedPortDelay)
- }
-
before := sw.Sockets()
origTestHookLookupIP := testHookLookupIP
defer func() { testHookLookupIP = origTestHookLookupIP }()
@@ -115,7 +110,7 @@ func TestDialerDualStackFDLeak(t *testing.T) {
const N = 10
var wg sync.WaitGroup
wg.Add(N)
- d := &Dialer{DualStack: true, Timeout: 100*time.Millisecond + closedPortDelay}
+ d := &Dialer{DualStack: true, Timeout: 5 * time.Second}
for i := 0; i < N; i++ {
go func() {
defer wg.Done()