summaryrefslogtreecommitdiff
path: root/test/socket
diff options
context:
space:
mode:
Diffstat (limited to 'test/socket')
-rw-r--r--test/socket/test_tcp.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb
index 11325fdedb..15c79b7519 100644
--- a/test/socket/test_tcp.rb
+++ b/test/socket/test_tcp.rb
@@ -55,6 +55,20 @@ class TestSocket_TCPSocket < Test::Unit::TestCase
t.close if t && !t.closed?
end
+ def test_initialize_resolv_timeout
+ TCPServer.open("localhost", 0) do |svr|
+ th = Thread.new {
+ c = svr.accept
+ c.close
+ }
+ addr = svr.addr
+ s = TCPSocket.new(addr[3], addr[1], resolv_timeout: 10)
+ th.join
+ ensure
+ s.close()
+ end
+ end
+
def test_recvfrom
TCPServer.open("localhost", 0) {|svr|
th = Thread.new {