aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2020-05-13 16:37:16 +0900
committerKazuki Yamaguchi <k@rhe.jp>2020-05-13 16:40:24 +0900
commit413b15526e4e0bc7d98988a8eadf1358be727187 (patch)
tree105be5e5591114b82407426aa681ed27ef391ad3 /test
parent016a4f8cc48f6ec62c6fac06f20e22e46e92a84f (diff)
downloadruby-openssl-413b15526e4e0bc7d98988a8eadf1358be727187.tar.gz
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)
Diffstat (limited to 'test')
-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 6095d545..b4619de2 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