net/http: do not listen on public network during HTTP/2 test

Avoids Mac firewall box.

Change-Id: I000e421fa9639612d636b6fa4baf905459c5aeb2
Reviewed-on: https://go-review.googlesource.com/16514
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Russ Cox 2015-10-30 13:50:19 -04:00
parent ddbc802b07
commit 845878a213
1 changed files with 1 additions and 4 deletions

View File

@ -1070,10 +1070,7 @@ func TestTLSServer(t *testing.T) {
}
func TestAutomaticHTTP2(t *testing.T) {
ln, err := net.Listen("tcp", ":0")
if err != nil {
t.Fatal(err)
}
ln := newLocalListener(t)
ln.Close() // immediately (not a defer!)
var s Server
if err := s.Serve(ln); err == nil {