Skip to content

Commit c7754c8

Browse files
mundaymbradfitz
authored andcommitted
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 <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent c40a73d commit c7754c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net/dnsclient_unix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func TestSpecialDomainName(t *testing.T) {
8080

8181
server := "8.8.8.8:53"
8282
for _, tt := range specialDomainNameTests {
83-
msg, err := exchange(server, tt.name, tt.qtype, 0)
83+
msg, err := exchange(server, tt.name, tt.qtype, 3*time.Second)
8484
if err != nil {
8585
t.Error(err)
8686
continue

0 commit comments

Comments
 (0)