summaryrefslogtreecommitdiff
path: root/test/openssl
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2020-05-13 16:37:16 +0900
committerKazuki Yamaguchi <k@rhe.jp>2021-03-16 19:16:11 +0900
commitd60ab95398ecdb2ae9a78e12244f5019d335b356 (patch)
tree423f736c9c8369e0c5af7bf487a13f6485c6a73d /test/openssl
parent498c8e8f17d5a06244515db163a714e87a4fce76 (diff)
[ruby/openssl] 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: 98f8787b4687 ("test/openssl/test_ssl: fix random failure in SSLSocket.open test", 2020-02-17) https://github.com/ruby/openssl/commit/413b15526e
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4275
Diffstat (limited to 'test/openssl')
-rw-r--r--test/openssl/test_ssl.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index 6095d545b5..b4619de259 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -99,7 +99,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
assert_equal ctx, ssl.context
assert_equal random_port, ssl.io.local_address.ip_port
ssl.puts "abc"; assert_equal "abc\n", ssl.gets
- rescue Errno::EADDRINUSE
+ rescue Errno::EADDRINUSE, Errno::EACCES
ensure
ssl&.close
end