Skip to content

Commit 413b155

Browse files
committed
test/openssl/test_ssl: fix flaky test case
Fix test_socket_open_with_local_address_port_context. Often with MinGW, it seems EACCES is returned on bind when the port number is unavailable. Ignore it just as we do for EADDRINUSE and continue searching free port number. Fixes: 98f8787 ("test/openssl/test_ssl: fix random failure in SSLSocket.open test", 2020-02-17)
1 parent 016a4f8 commit 413b155

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/openssl/test_ssl.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_socket_open_with_local_address_port_context
9999
assert_equal ctx, ssl.context
100100
assert_equal random_port, ssl.io.local_address.ip_port
101101
ssl.puts "abc"; assert_equal "abc\n", ssl.gets
102-
rescue Errno::EADDRINUSE
102+
rescue Errno::EADDRINUSE, Errno::EACCES
103103
ensure
104104
ssl&.close
105105
end

0 commit comments

Comments
 (0)