aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 18:44:49 +0000
committerKazuki Yamaguchi <k@rhe.jp>2017-12-14 18:16:24 +0900
commitd5014e393ad18134fd5f7585d0a0182c18c2d159 (patch)
treead4618bae3763df1a34b257e89498686c30492a1
parent01445af367ec9fd12a96c56e31f3b6aa68678a28 (diff)
downloadruby-openssl-ky/fix-ssl-test-internal-encoding.tar.gz
Fix test-all tests to avoid creating report_on_exception warningsky/fix-ssl-test-internal-encoding
* 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 01445af367ec ("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
-rw-r--r--test/test_ssl.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_ssl.rb b/test/test_ssl.rb
index cfce1964..d84d162e 100644
--- a/test/test_ssl.rb
+++ b/test/test_ssl.rb
@@ -1259,13 +1259,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