mirror of
https://github.com/golang/go
synced 2024-11-22 05:24:39 -07:00
net: run TestDialTimeout on windows
R=golang-dev, rsc CC=bradfitz, golang-dev, mikioh.mikioh https://golang.org/cl/5616066
This commit is contained in:
parent
97ef437212
commit
1f133e2b8e
@ -43,18 +43,17 @@ func TestDialTimeout(t *testing.T) {
|
|||||||
errc <- err
|
errc <- err
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
case "darwin":
|
case "darwin", "windows":
|
||||||
// At least OS X 10.7 seems to accept any number of
|
// At least OS X 10.7 seems to accept any number of
|
||||||
// connections, ignoring listen's backlog, so resort
|
// connections, ignoring listen's backlog, so resort
|
||||||
// to connecting to a hopefully-dead 127/8 address.
|
// to connecting to a hopefully-dead 127/8 address.
|
||||||
|
// Same for windows.
|
||||||
go func() {
|
go func() {
|
||||||
_, err := DialTimeout("tcp", "127.0.71.111:80", 200*time.Millisecond)
|
_, err := DialTimeout("tcp", "127.0.71.111:80", 200*time.Millisecond)
|
||||||
errc <- err
|
errc <- err
|
||||||
}()
|
}()
|
||||||
default:
|
default:
|
||||||
// TODO(bradfitz): this probably doesn't work on
|
// TODO(bradfitz):
|
||||||
// Windows? SOMAXCONN is huge there. I'm not sure how
|
|
||||||
// listen works there.
|
|
||||||
// OpenBSD may have a reject route to 10/8.
|
// OpenBSD may have a reject route to 10/8.
|
||||||
// FreeBSD likely works, but is untested.
|
// FreeBSD likely works, but is untested.
|
||||||
t.Logf("skipping test on %q; untested.", runtime.GOOS)
|
t.Logf("skipping test on %q; untested.", runtime.GOOS)
|
||||||
|
Loading…
Reference in New Issue
Block a user