mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net: ignore TestDialerLocalAddr timeout failures on Darwin
I don't know why these errors occur. Ignore them to avoid breaking the build. Updates #22019 Change-Id: Ia048e6d9b928e8e237b311ff3a364e7a23af4aa4 Reviewed-on: https://go-review.googlesource.com/86000 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
36454187db
commit
74d8340cf6
1 changed files with 8 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ import (
|
||||||
"internal/poll"
|
"internal/poll"
|
||||||
"internal/testenv"
|
"internal/testenv"
|
||||||
"io"
|
"io"
|
||||||
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -634,7 +635,13 @@ func TestDialerLocalAddr(t *testing.T) {
|
||||||
}
|
}
|
||||||
c, err := d.Dial(tt.network, addr)
|
c, err := d.Dial(tt.network, addr)
|
||||||
if err == nil && tt.error != nil || err != nil && tt.error == nil {
|
if err == nil && tt.error != nil || err != nil && tt.error == nil {
|
||||||
t.Errorf("%s %v->%s: got %v; want %v", tt.network, tt.laddr, tt.raddr, err, tt.error)
|
// On Darwin this occasionally times out.
|
||||||
|
// We don't know why. Issue #22019.
|
||||||
|
if runtime.GOOS == "darwin" && tt.error == nil && os.IsTimeout(err) {
|
||||||
|
t.Logf("ignoring timeout error on Darwin; see https://golang.org/issue/22019")
|
||||||
|
} else {
|
||||||
|
t.Errorf("%s %v->%s: got %v; want %v", tt.network, tt.laddr, tt.raddr, err, tt.error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if perr := parseDialError(err); perr != nil {
|
if perr := parseDialError(err); perr != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue