summaryrefslogtreecommitdiff
path: root/test/net/http/test_https.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-10-24 18:24:24 +0900
committernagachika <nagachika@ruby-lang.org>2022-10-24 23:07:33 +0900
commitf08dee67dc41d961f9032ba18dc597ea072672fb (patch)
treeb24bb3ef46841cb81e97d22aac2a058dba2a3852 /test/net/http/test_https.rb
parent8bce7c1a725073b88cf96c3af6f37405b66d7db9 (diff)
Bump up net-http 0.3.0
Diffstat (limited to 'test/net/http/test_https.rb')
-rw-r--r--test/net/http/test_https.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb
index 4dc9f1b026..72a69af1a5 100644
--- a/test/net/http/test_https.rb
+++ b/test/net/http/test_https.rb
@@ -137,7 +137,7 @@ class TestNetHTTPS < Test::Unit::TestCase
def test_session_reuse
# FIXME: The new_session_cb is known broken for clients in OpenSSL 1.1.0h.
# See https://github.com/openssl/openssl/pull/5967 for details.
- skip if OpenSSL::OPENSSL_LIBRARY_VERSION =~ /OpenSSL 1.1.0h/
+ omit if OpenSSL::OPENSSL_LIBRARY_VERSION.include?('OpenSSL 1.1.0h')
http = Net::HTTP.new(HOST, config("port"))
http.use_ssl = true
@@ -152,19 +152,21 @@ class TestNetHTTPS < Test::Unit::TestCase
end
http.start
- assert_equal false, http.instance_variable_get(:@socket).io.session_reused?
+ session_reused = http.instance_variable_get(:@socket).io.session_reused?
+ assert_false session_reused unless session_reused.nil? # can not detect re-use under JRuby
http.get("/")
http.finish
http.start
- assert_equal true, http.instance_variable_get(:@socket).io.session_reused?
+ session_reused = http.instance_variable_get(:@socket).io.session_reused?
+ assert_true session_reused unless session_reused.nil? # can not detect re-use under JRuby
assert_equal $test_net_http_data, http.get("/").body
http.finish
end
def test_session_reuse_but_expire
# FIXME: The new_session_cb is known broken for clients in OpenSSL 1.1.0h.
- skip if OpenSSL::OPENSSL_LIBRARY_VERSION =~ /OpenSSL 1.1.0h/
+ omit if OpenSSL::OPENSSL_LIBRARY_VERSION.include?('OpenSSL 1.1.0h')
http = Net::HTTP.new(HOST, config("port"))
http.use_ssl = true
@@ -301,7 +303,7 @@ class TestNetHTTPS < Test::Unit::TestCase
ex = assert_raise(OpenSSL::SSL::SSLError){
http.request_get("/") {|res| }
}
- re_msg = /\ASSL_connect returned=1 errno=0 |SSL_CTX_set_max_proto_version/
+ re_msg = /\ASSL_connect returned=1 errno=0 |SSL_CTX_set_max_proto_version|No appropriate protocol/
assert_match(re_msg, ex.message)
end