summaryrefslogtreecommitdiff
path: root/test/openssl/utils.rb
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-15 08:19:32 +0000
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-15 08:19:32 +0000
commit42c4ca634de202e9a4c7d9ab021b425631cf54df (patch)
treec387071879327e403fe23ce0baf3522939171d0f /test/openssl/utils.rb
parenta32e3fee79dcf6a13d90416bca1fca82fcf537c0 (diff)
openssl: suppress report_on_exception warning
Import a commit from upstream: 33a67ac96492 test/utils: disable Thread's report_on_exception in start_server git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl/utils.rb')
-rw-r--r--test/openssl/utils.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/openssl/utils.rb b/test/openssl/utils.rb
index a3599490615..6318246ddb2 100644
--- a/test/openssl/utils.rb
+++ b/test/openssl/utils.rb
@@ -214,6 +214,10 @@ class OpenSSL::SSLTestCase < OpenSSL::TestCase
threads = []
begin
server_thread = Thread.new do
+ if Thread.method_defined?(:report_on_exception=) # Ruby >= 2.4
+ Thread.current.report_on_exception = false
+ end
+
begin
loop do
begin
@@ -227,6 +231,10 @@ class OpenSSL::SSLTestCase < OpenSSL::TestCase
end
th = Thread.new do
+ if Thread.method_defined?(:report_on_exception=)
+ Thread.current.report_on_exception = false
+ end
+
begin
server_proc.call(ctx, ssl)
ensure
@@ -242,6 +250,10 @@ class OpenSSL::SSLTestCase < OpenSSL::TestCase
end
client_thread = Thread.new do
+ if Thread.method_defined?(:report_on_exception=)
+ Thread.current.report_on_exception = false
+ end
+
begin
block.call(port)
ensure