1
0
mirror of https://github.com/golang/go synced 2024-11-18 03:34:42 -07:00

net: deflake TestTCPSupriousConnSetupCompletion [sic]

And rename it.

Fixes #17703

Change-Id: I73c82a9b3f96180699c6d33c069a666018eb30f9
Reviewed-on: https://go-review.googlesource.com/33149
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Brad Fitzpatrick 2016-11-11 14:05:51 -08:00
parent 02d79e9558
commit 9a78eadeb6
2 changed files with 4 additions and 3 deletions

View File

@ -97,7 +97,8 @@ second:
goto third
}
switch nestedErr {
case errCanceled, errClosing, errMissingAddress, errNoSuitableAddress:
case errCanceled, errClosing, errMissingAddress, errNoSuitableAddress,
context.DeadlineExceeded, context.Canceled:
return nil
}
return fmt.Errorf("unexpected type on 2nd nested level: %T", nestedErr)

View File

@ -15,7 +15,7 @@ import (
)
// See golang.org/issue/14548.
func TestTCPSupriousConnSetupCompletion(t *testing.T) {
func TestTCPSpuriousConnSetupCompletion(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode")
}
@ -57,7 +57,7 @@ func TestTCPSupriousConnSetupCompletion(t *testing.T) {
c, err := d.Dial(ln.Addr().Network(), ln.Addr().String())
if err != nil {
if perr := parseDialError(err); perr != nil {
t.Errorf("#%d: %v", i, err)
t.Errorf("#%d: %v (original error: %v)", i, perr, err)
}
return
}