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:
parent
a32e3fee79
commit
42c4ca634d
1 changed files with 12 additions and 0 deletions
|
@ -214,6 +214,10 @@ class OpenSSL::SSLTestCase < OpenSSL::TestCase
|
||||||
threads = []
|
threads = []
|
||||||
begin
|
begin
|
||||||
server_thread = Thread.new do
|
server_thread = Thread.new do
|
||||||
|
if Thread.method_defined?(:report_on_exception=) # Ruby >= 2.4
|
||||||
|
Thread.current.report_on_exception = false
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
loop do
|
loop do
|
||||||
begin
|
begin
|
||||||
|
@ -227,6 +231,10 @@ class OpenSSL::SSLTestCase < OpenSSL::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
th = Thread.new do
|
th = Thread.new do
|
||||||
|
if Thread.method_defined?(:report_on_exception=)
|
||||||
|
Thread.current.report_on_exception = false
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
server_proc.call(ctx, ssl)
|
server_proc.call(ctx, ssl)
|
||||||
ensure
|
ensure
|
||||||
|
@ -242,6 +250,10 @@ class OpenSSL::SSLTestCase < OpenSSL::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
client_thread = Thread.new do
|
client_thread = Thread.new do
|
||||||
|
if Thread.method_defined?(:report_on_exception=)
|
||||||
|
Thread.current.report_on_exception = false
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
block.call(port)
|
block.call(port)
|
||||||
ensure
|
ensure
|
||||||
|
|
Loading…
Add table
Reference in a new issue