Skip to content

Commit f37128d

Browse files
committed
Add test for not retrying request block
1 parent 8c81ab2 commit f37128d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/net/http/test_http.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,16 @@ def test_http_retry_failed
12341234
}
12351235
end
12361236

1237+
def test_http_retry_failed_with_block
1238+
start {|http|
1239+
http.max_retries = 10
1240+
called = 0
1241+
assert_raise(Errno::ECONNRESET){ http.get('/'){called += 1; raise Errno::ECONNRESET} }
1242+
assert_equal 1, called
1243+
}
1244+
@log_tester = nil
1245+
end
1246+
12371247
def test_keep_alive_server_close
12381248
def @server.run(sock)
12391249
sock.close

0 commit comments

Comments
 (0)