Skip to content

Commit d5014e3

Browse files
eregonrhenium
authored andcommitted
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 [ky: this effectively reverts commit 01445af ("test/test_ssl: prevent changing default internal encoding", 2017-11-26). This is OK since EnvUtil.with_default_internal has been made thread-safe.] Sync-with-trunk: r61188
1 parent 01445af commit d5014e3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/test_ssl.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,13 +1259,15 @@ def test_fallback_scsv
12591259
ctx2.enable_fallback_scsv
12601260
ctx2.max_version = OpenSSL::SSL::TLS1_1_VERSION
12611261
s2 = OpenSSL::SSL::SSLSocket.new(sock2, ctx2)
1262-
t = Thread.new { s2.connect }
1263-
assert_raise_with_message(OpenSSL::SSL::SSLError, /inappropriate fallback/) {
1264-
s1.accept
1262+
t = Thread.new {
1263+
assert_raise_with_message(OpenSSL::SSL::SSLError, /inappropriate fallback/) {
1264+
s2.connect
1265+
}
12651266
}
12661267
assert_raise_with_message(OpenSSL::SSL::SSLError, /inappropriate fallback/) {
1267-
t.join
1268+
s1.accept
12681269
}
1270+
t.join
12691271
ensure
12701272
sock1.close
12711273
sock2.close

0 commit comments

Comments
 (0)