aboutsummaryrefslogtreecommitdiffstats
path: root/test/socket/test_addrinfo.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/socket/test_addrinfo.rb')
-rw-r--r--test/socket/test_addrinfo.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/socket/test_addrinfo.rb b/test/socket/test_addrinfo.rb
index a06f3eb451..2af6918caa 100644
--- a/test/socket/test_addrinfo.rb
+++ b/test/socket/test_addrinfo.rb
@@ -688,5 +688,10 @@ class TestSocketAddrinfo < Test::Unit::TestCase
assert_equal(ai1.canonname, ai2.canonname)
end
+ def test_addrinfo_timeout
+ ai = Addrinfo.getaddrinfo("localhost.localdomain", "http", Socket::PF_INET, Socket::SOCK_STREAM, timeout: 1).fetch(0)
+ assert_equal(6, ai.protocol)
+ assert_equal(80, ai.ip_port)
+ end
end
end