diff options
author | Michael Munday <munday@ca.ibm.com> | 2016-01-14 16:36:43 -0500 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-01-19 06:20:36 +0000 |
commit | c7754c8f54a1ace5fc0a8e36df809c713d2623d6 (patch) | |
tree | 462ebeb8b6b0e9a05e98a577c4001fc56842bf3a /src/net/dnsclient_unix_test.go | |
parent | c40a73d80c38eacc27e8cb9cf25c2bacaee60a3d (diff) | |
download | go-c7754c8f54a1ace5fc0a8e36df809c713d2623d6.tar.gz go-c7754c8f54a1ace5fc0a8e36df809c713d2623d6.zip |
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 <mikioh.mikioh@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/dnsclient_unix_test.go')
-rw-r--r-- | src/net/dnsclient_unix_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/dnsclient_unix_test.go b/src/net/dnsclient_unix_test.go index 5ef02a14770..934f25b2c94 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 |