Skip to content

Commit 98d0da9

Browse files
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 25363de commit 98d0da9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/net/dial_test.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ func TestDialerDualStackFDLeak(t *testing.T) {
8585
t.Skip("both IPv4 and IPv6 are required")
8686
}
8787

88-
closedPortDelay, expectClosedPortDelay := dialClosedPort()
89-
if closedPortDelay > expectClosedPortDelay {
90-
t.Errorf("got %v; want <= %v", closedPortDelay, expectClosedPortDelay)
91-
}
92-
9388
before := sw.Sockets()
9489
origTestHookLookupIP := testHookLookupIP
9590
defer func() { testHookLookupIP = origTestHookLookupIP }()
@@ -115,7 +110,7 @@ func TestDialerDualStackFDLeak(t *testing.T) {
115110
const N = 10
116111
var wg sync.WaitGroup
117112
wg.Add(N)
118-
d := &Dialer{DualStack: true, Timeout: 100*time.Millisecond + closedPortDelay}
113+
d := &Dialer{DualStack: true, Timeout: 5 * time.Second}
119114
for i := 0; i < N; i++ {
120115
go func() {
121116
defer wg.Done()

0 commit comments

Comments
 (0)