aboutsummaryrefslogtreecommitdiffstats
path: root/test/net/http/test_http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/net/http/test_http.rb')
-rw-r--r--test/net/http/test_http.rb2
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('/') }