diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-03 12:06:14 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-03 12:06:14 +0000 |
commit | 5f6b04223fcfeed95ceab087a434a0ff4d1eb303 (patch) | |
tree | a60c231dcb415240f1b41baddceb9e4c11c5ea57 /test | |
parent | 7f6e18fad00ac0959dfc1fe6dd73423537759ba3 (diff) | |
download | ruby-5f6b04223fcfeed95ceab087a434a0ff4d1eb303.tar.gz |
Fix leaked file descriptor
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/net/http/test_http.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb index 13c95fc0dc..c5a77d3695 100644 --- a/test/net/http/test_http.rb +++ b/test/net/http/test_http.rb @@ -1085,6 +1085,7 @@ class TestNetHTTPKeepAlive < Test::Unit::TestCase def test_http_retry_success start {|http| socket = MockSocket.new(success_after: 10) + http.instance_variable_get(:@socket).close http.instance_variable_set(:@socket, socket) assert_equal 0, socket.count http.max_retries = 10 @@ -1098,6 +1099,7 @@ class TestNetHTTPKeepAlive < Test::Unit::TestCase def test_http_retry_failed start {|http| socket = MockSocket.new + http.instance_variable_get(:@socket).close http.instance_variable_set(:@socket, socket) http.max_retries = 10 assert_raise(Errno::ECONNRESET){ http.get('/') } |