1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
rhe 2017-12-15 08:19:32 +00:00
parent a32e3fee79
commit 42c4ca634d

View file

@ -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