Allow Errno::EACCES when testing connection timeout
Some packaging systems that include support for running tests, such as OpenBSD's, do not allow outbound network connections during testing for security reasons. EACCES is the error raised by OpenBSD in this case.
This commit is contained in:
parent
974b404327
commit
08f14b8d4c
Notes:
git
2024-09-04 01:21:21 +00:00
Merged: https://github.com/ruby/ruby/pull/11535 Merged-By: jeremyevans <code@jeremyevans.net>
@ -70,7 +70,7 @@ class TestSocket_TCPSocket < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_initialize_connect_timeout
|
||||
assert_raise(IO::TimeoutError, Errno::ENETUNREACH) do
|
||||
assert_raise(IO::TimeoutError, Errno::ENETUNREACH, Errno::EACCES) do
|
||||
TCPSocket.new("192.0.2.1", 80, connect_timeout: 0)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user