Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework of timeout errors (part 3): extend all raised timeout exceptions with HTTPI::TimeoutError #198

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9074c33
Add integration test for net_http + read_timeout
Aug 23, 2018
8b249bc
Add integration test for net_http_persistent + read_timeout
Aug 23, 2018
f692635
Add integration test for excon + read_timeout
Aug 23, 2018
6046d35
Set timeouts in msec in curb adapter
Aug 23, 2018
bf760e1
Add integration test for curb + read_timeout
Aug 23, 2018
4544e6c
Add integration test for em_http + read_timeout
Aug 23, 2018
ec837d2
Add integration test for httpclient + read_timeout
Aug 23, 2018
370e3f5
Add support for open/read timeouts to http adapter
Aug 23, 2018
b8426ac
Add integration test for http + read_timeout
Aug 23, 2018
06d2086
Remove debug output from timeout specs
Aug 23, 2018
c59e11a
Fix broken timeout specs for curb adapter
Aug 23, 2018
1c3aba4
Fix em_http adapter: do not set timeouts to nil explicitly
Aug 23, 2018
8b96c4a
Disable read_timeout test for em_http_request adapter on jruby
Aug 27, 2018
d3edcc4
Add support for write_timeout config option
Aug 23, 2018
f2d0e77
Move excon integration tests to the appropriate file
Aug 23, 2018
bf0352c
Move http integration tests to the appropriate file
Aug 23, 2018
eb5f009
Move net_http_persistent integration tests to the appropriate file
Aug 23, 2018
885e373
Move net_http integration tests to the appropriate file
Aug 24, 2018
5d83dc9
Add tests for different timeout options to all adapters
Aug 24, 2018
d47c8cb
Extend all timeout exceptions with ::HTTPI::TimeoutError (it is modul…
Aug 24, 2018
4186857
No need to require http libs, because errors classes are checked lazi…
Aug 24, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add integration test for http + read_timeout
  • Loading branch information
Alexey Chernenkov committed Aug 23, 2018
commit b8426ac1d020d65eeaa476ebc41467af8e1bade5
12 changes: 12 additions & 0 deletions spec/integration/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
expect(response.headers["Set-Cookie"]).to eq(cookies)
end

it "it supports read timeout" do
require "http"

request = HTTPI::Request.new(@server.url + "timeout")
request.read_timeout = 0.5 # seconds

expect do
HTTPI.get(request, adapter)
end.to raise_exception(HTTP::TimeoutError)
end


it "executes GET requests" do
response = HTTPI.get(@server.url, adapter)
expect(response.body).to eq("get")
Expand Down