Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleanup warnings

  • Loading branch information...
commit bbbbf003076372fe5d26cbfa08ba0fe470c6f831 1 parent 2e9d64c
@drbrain authored
Showing with 8 additions and 21 deletions.
  1. +8 −21 test/test_net_http_persistent.rb
View
29 test/test_net_http_persistent.rb
@@ -286,25 +286,6 @@ def test_connection_for_cached_expire_never
assert_same cached, c
assert_equal 10, reqs[cached.object_id],
- 'connection not reset due to timeout'
- end
-
- def test_connection_for_cached_expire_never
- cached = basic_connection
- cached.start
- conns[0]['example.com:80'] = cached
- reqs[cached.object_id] = 10
- touts[cached.object_id] = Time.now # last used right now
-
- @http.idle_timeout = nil
-
- c = @http.connection_for @uri
-
- assert c.started?
-
- assert_same cached, c
-
- assert_equal 10, reqs[cached.object_id],
'connection reset despite no timeout'
end
@@ -790,6 +771,10 @@ def test_request_block
def test_request_close_1_0
c = connection
+ class << c
+ remove_method :request
+ end
+
def c.request req
@req = req
r = Net::HTTPResponse.allocate
@@ -837,6 +822,10 @@ def test_request_connection_close_request
def test_request_connection_close_response
c = connection
+ class << c
+ remove_method :request
+ end
+
def c.request req
@req = req
r = Net::HTTPResponse.allocate
@@ -1045,7 +1034,6 @@ def test_retry_change_requests_equals
def test_shutdown
ssl_conns
c = connection
- cs = conns
rs = reqs
ts = touts
@@ -1274,7 +1262,6 @@ def test_ssl_warning
def test_ssl_cleanup
uri1 = URI.parse 'https://one.example'
- uri2 = URI.parse 'https://two.example'
c1 = @http.connection_for uri1
Please sign in to comment.
Something went wrong with that request. Please try again.