Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use with_connection to make request.

  • Loading branch information...
commit e58c9909895e0ea2e0096f8586d4ffcc763c6431 1 parent 48daae8
@i0rek authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
8 spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
@@ -15,9 +15,11 @@ def http_request(method, uri, options = {}, &block)
:timeout => 25000
- hydra = => 0)
- hydra.queue(request)
+ Typhoeus.with_connection {
+ hydra =
+ hydra.queue(request)
+ }
response = request.response
raise if response.timed_out?
raise if response.code == 0

3 comments on commit e58c990


I think what @myronmarston said about vcr applies here too: i0rek/vcr@84fb704#commitcomment-1928493.

The with_connection block shouldn't be there.


I updated VCR based on typhoeus/typhoeus@0caa30b so that VCR now sets request.block_connection = false on individual requests rather than wrapping them in with_connection at the point the request is made, and that worked...but I started getting failures from the webmock specs when using typhoeus because the client still has to use with_connection when using typhoeus with WebMock as demonstrated here. I can't get a green VCR build until this is fixed.


I'll take care of that. Thanks for your effort!

Please sign in to comment.
Something went wrong with that request. Please try again.