diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb index 53092ee..cf880f2 100644 --- a/test/net/http/test_http.rb +++ b/test/net/http/test_http.rb @@ -1234,6 +1234,15 @@ def test_http_retry_failed } end + def test_http_retry_failed_with_block + start {|http| + http.max_retries = 10 + called = 0 + assert_raise(Errno::ECONNRESET){ http.get('/'){called += 1; raise Errno::ECONNRESET} } + assert_equal 1, called + } + end + def test_keep_alive_server_close def @server.run(sock) sock.close