Skip to content

Commit

Permalink
Add test for not retrying request block
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Jan 5, 2024
1 parent 8c81ab2 commit eea335a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/net/http/test_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eea335a

Please sign in to comment.