This bug had me stumped when I was writing a Faraday adapter for Curb - I could never get the parallel requests test to pass!
I checked Curb's own tests but the tc_curl_multi.rb tests were still passing - it was only after I explicitly broke the tests (see e45a394) and the tests still passed that I realized the callbacks weren't actually being performed, so no assertions were actually run.
I traced the error back to 327e209, circa Curb 0.7.14 (it's still working on 0.7.14, but not in any versions after that). It's all due to the until urls_with_config.empty? check (I find until to be rather confusing).
Fixed the problem, plus added a test that covers the case where :max_connects < number of requests.
Note: You can leave out the commits I added to break and fix the tests (e45a394, fdea6ab) - I left them in for verification.
Break Curl::Multi get, post, download and http tests to show that the…
…y still pass because the callbacks are never actually run.
Fix Curl::Multi not actually performing HTTP requests in cases when t…
…he :max_connects >= number of requests.
Revert "Break Curl::Multi get, post, download and http tests to show …
…that they still pass because the callbacks are never actually run."
This reverts commit e45a394.
Add a test for Curl::Multi with :max_connects < number of requests.
i'll try and review this one over this weekend.
Hi Todd, I hate to be naggy but I hope you can merge this (this weekend maybe?) and publish a new gem release soon. I don't know how the bug slipped past so many releases so please verify my findings in case I've got it wrong. My guess is that most people are using Curl::Multi#add and Curl::Multi#perform instead of the simpler Curl::Multi.verb methods - or there're just not many people actually using Curb's multi interface.