myronmarston/vcr — Issue #132: UnhandledHTTPRequestError when running Anemone with only one Thread
Author: brutuscat
Created: 2012-02-01 09:03:47+00:00
State: open

This is weird. I mean, I really don't know even what to put here to help to solve this. The case is as follows:

* I have an Anemone setup to crawl a web site withing a specific set of URLs. I'm running some specs (RSpec 2) within a subset of this urls.
* So I explicit record some request in my before(:all) like this:

```ruby
before(:all) do
VCR.use_cassette(cassette, :record => :new_episodes, :serialize_with => :syck) do
Net::HTTP.get(URI("http://www.example.com/url1/"))
Net::HTTP.get(URI("http://www.example.com/url1/url2"))
end
....
```

* I then have set `use_vcr_cassette cassette, :record => :none, :serialize_with => :syck` and somewhere later I run the Anemone code that does stuff and (should) only crawl the recorded requests.

So this works great if Anemone is being used with **more than 1 thread**. But when I (because I'm a weird guy) try my production configuration, which it is with only 1 thread for Anemone, there are one specific, explicitly recorded URL that continually fails with `VCR::Errors::UnhandledHTTPRequestError`.

I checked the cassette file and the data IS there. So I'm pretty much exausted my alternatives here. I mean I can will run my tests in multi-threaded Anemone, but this just looks weird....