From c7754c8f54a1ace5fc0a8e36df809c713d2623d6 Mon Sep 17 00:00:00 2001 From: Michael Munday Date: Thu, 14 Jan 2016 16:36:43 -0500 Subject: [PATCH] net: add timeout to DNS requests sent by TestSpecialDomainName The timeout means that TestSpecialDomainName will not hang if the DNS server does not respond to the request. Fixes #13939 Change-Id: I46e30bbd3c11b6c560656134e704331cf6f8af3f Reviewed-on: https://go-review.googlesource.com/18661 Reviewed-by: Mikio Hara Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/net/dnsclient_unix_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/dnsclient_unix_test.go b/src/net/dnsclient_unix_test.go index 5ef02a1477..934f25b2c9 100644 --- a/src/net/dnsclient_unix_test.go +++ b/src/net/dnsclient_unix_test.go @@ -80,7 +80,7 @@ func TestSpecialDomainName(t *testing.T) { server := "8.8.8.8:53" for _, tt := range specialDomainNameTests { - msg, err := exchange(server, tt.name, tt.qtype, 0) + msg, err := exchange(server, tt.name, tt.qtype, 3*time.Second) if err != nil { t.Error(err) continue