aboutsummaryrefslogtreecommitdiffstats
path: root/test/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'test/resolv')
-rw-r--r--test/resolv/test_dns.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb
index f3f6ec212f..da7fa43dbc 100644
--- a/test/resolv/test_dns.rb
+++ b/test/resolv/test_dns.rb
@@ -53,7 +53,9 @@ class TestResolvDNS < Test::Unit::TestCase
}
}
server_thread = Thread.new {
- msg, (_, client_port, _, client_address) = u.recvfrom(4096)
+ timeout(5) do
+ msg, (_, client_port, _, client_address) = u.recvfrom(4096)
+ end
id, word2, qdcount, ancount, nscount, arcount = msg.unpack("nnnnnn")
qr = (word2 & 0x8000) >> 15
opcode = (word2 & 0x7800) >> 11