diff options
| author | Mikio Hara <mikioh.mikioh@gmail.com> | 2012-03-07 16:28:40 +0900 |
|---|---|---|
| committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2012-03-07 16:28:40 +0900 |
| commit | ae7a84347100f375f9c7ba01cf042faf4e9fcc1a (patch) | |
| tree | e1cbc20b6f542e86696b193a5dfc37ff2963f939 /src | |
| parent | 4267974c0ba2d30b499f208a97efc53e3bcf5a26 (diff) | |
| download | go-ae7a84347100f375f9c7ba01cf042faf4e9fcc1a.tar.xz | |
net: use IANA reserved port to test dial timeout
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5757060
Diffstat (limited to 'src')
| -rw-r--r-- | src/pkg/net/dial_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pkg/net/dial_test.go b/src/pkg/net/dial_test.go index f9c47d02bb..7212087fe0 100644 --- a/src/pkg/net/dial_test.go +++ b/src/pkg/net/dial_test.go @@ -51,12 +51,15 @@ func TestDialTimeout(t *testing.T) { // to connecting to a hopefully-dead 127/8 address. // Same for windows. // - // Use a bogus port (44444) instead of 80, because + // Use an IANA reserved port (49151) instead of 80, because // on our 386 builder, this Dial succeeds, connecting // to an IIS web server somewhere. The data center // or VM or firewall must be stealing the TCP connection. + // + // IANA Service Name and Transport Protocol Port Number Registry + // <http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml> go func() { - c, err := DialTimeout("tcp", "127.0.71.111:44444", 200*time.Millisecond) + c, err := DialTimeout("tcp", "127.0.71.111:49151", 200*time.Millisecond) if err == nil { err = fmt.Errorf("unexpected: connected to %s!", c.RemoteAddr()) c.Close() |
