[前][次][番号順一覧][スレッド一覧]

ruby-changes:65553

From: Kazuki <ko1@a...>
Date: Tue, 16 Mar 2021 20:38:46 +0900 (JST)
Subject: [ruby-changes:65553] d60ab95398 (master): [ruby/openssl] test/openssl/test_ssl: fix flaky test case

https://git.ruby-lang.org/ruby.git/commit/?id=d60ab95398

From d60ab95398ecdb2ae9a78e12244f5019d335b356 Mon Sep 17 00:00:00 2001
From: Kazuki Yamaguchi <k@r...>
Date: Wed, 13 May 2020 16:37:16 +0900
Subject: [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
---
 test/openssl/test_ssl.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index 6095d54..b4619de 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -99,7 +99,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase https://github.com/ruby/ruby/blob/trunk/test/openssl/test_ssl.rb#L99
         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
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]