diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 18:44:49 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 18:44:49 +0000 |
commit | 15689ed7780b06ddc14cde4f427de834177283a5 (patch) | |
tree | bed64f4fdaf3e1a140642bdd0354384ae286759c /test/openssl | |
parent | 967eab83e333430600926366621aa3a978701c6a (diff) |
Fix test-all tests to avoid creating report_on_exception warnings
* The warnings are shown by Thread.report_on_exception defaulting to
true. [Feature #14143] [ruby-core:83979]
* Improves tests by narrowing down the scope where an exception
is expected.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-rw-r--r-- | test/openssl/test_ssl.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index 1f7f6a39d1..3b063d2e11 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -1340,13 +1340,15 @@ end ctx2.enable_fallback_scsv ctx2.max_version = OpenSSL::SSL::TLS1_1_VERSION s2 = OpenSSL::SSL::SSLSocket.new(sock2, ctx2) - t = Thread.new { s2.connect } - assert_raise_with_message(OpenSSL::SSL::SSLError, /inappropriate fallback/) { - s1.accept + t = Thread.new { + assert_raise_with_message(OpenSSL::SSL::SSLError, /inappropriate fallback/) { + s2.connect + } } assert_raise_with_message(OpenSSL::SSL::SSLError, /inappropriate fallback/) { - t.join + s1.accept } + t.join ensure sock1.close sock2.close |