Commit 9a78eade authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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: 's avatarIan Lance Taylor <iant@golang.org>
parent 02d79e95
......@@ -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)
......
......@@ -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
}
......
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