diff --git a/contrib/miekg/dns/dns_test.go b/contrib/miekg/dns/dns_test.go index 609a757902..6e38fbaca5 100644 --- a/contrib/miekg/dns/dns_test.go +++ b/contrib/miekg/dns/dns_test.go @@ -33,7 +33,7 @@ func startServer(t *testing.T, traced bool) (*dns.Server, func()) { if traced { h = dnstrace.WrapHandler(h) } - addr := getFreeAddr(t).String() + addr := getAddr(t).String() server := &dns.Server{ Addr: addr, Net: "udp", @@ -190,7 +190,7 @@ func assertClientSpan(t *testing.T, s mocktracer.Span) { assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind)) } -func getFreeAddr(t *testing.T) net.Addr { +func getAddr(t *testing.T) net.Addr { li, err := net.Listen("tcp4", "127.0.0.1:2020") if err != nil { t.Fatal(err)