http: do not listen on 0.0.0.0 during test

Quiets the pop-up boxes on OS X.

R=bradfitzgo, r2
CC=golang-dev
https://golang.org/cl/4387042
This commit is contained in:
Russ Cox 2011-04-08 13:04:29 -04:00
parent 740051ae75
commit e6e2eb5807

View File

@ -231,7 +231,7 @@ func TestMuxRedirectLeadingSlashes(t *testing.T) {
func TestServerTimeouts(t *testing.T) {
// TODO(bradfitz): convert this to use httptest.Server
l, err := net.ListenTCP("tcp", &net.TCPAddr{Port: 0})
l, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
t.Fatalf("listen error: %v", err)
}