Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Curb 0.7.16 breakage #136

Closed
myronmarston opened this Issue · 1 comment

2 participants

@myronmarston
Collaborator

My VCR travis builds started failing yesterday because Curb 0.7.16 was released a few days ago and my version constraint was "~> 0.7.15". Curb 0.7.16 appears to break WebMock a bit. In VCR, the bug manifests itself by one request getting recorded multiple times, due to WebMock's after_request hook being invoked multiple times for one request.

I was going to come here and write a failing test for WebMock, but it turns out tests are already failing if you install 0.7.16:


  1) Webmock with Curb using #http for requests it should behave like Curb with WebMock when request expectations are set when net connect is allowed should satisfy expectation if expected requests was made
     Failure/Error: lambda {
       expected no Exception, got #<RSpec::Expectations::ExpectationNotMetError: The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================>
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:271
     # ./spec/acceptance/shared/request_expectations.rb:606

  2) Webmock with Curb using #http for requests it should behave like Curb with WebMock when request expectations are set when net connect is allowed should fail request expected not to be made, was made
     Failure/Error: lambda {
       expected RSpec::Expectations::ExpectationNotMetError with message matching /The request GET http:\/\/www.example.com\/ was expected to execute 0 times but it executed 1 time/, got #<RSpec::Expectations::ExpectationNotMetError: The request GET http://www.example.com/ was expected to execute 0 times but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================>
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:271
     # ./spec/acceptance/shared/request_expectations.rb:613

  3) Webmock with Curb using #http for requests it should behave like Curb with WebMock when webmock is enabled again should register executed requests
     Failure/Error: a_request(:get, "http://www.example.com/").should have_been_made
       The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:271
     # ./spec/acceptance/shared/enabling_and_disabling_webmock.rb:74

  4) Webmock with Curb using #http for requests it should behave like Curb with WebMock when webmock is disabled except this lib should register executed requests
     Failure/Error: a_request(:get, "http://www.example.com/").should have_been_made
       The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:271
     # ./spec/acceptance/shared/enabling_and_disabling_webmock.rb:74

  5) Webmock with Curb using #http_* methods for requests it should behave like Curb with WebMock when request expectations are set when net connect is allowed should satisfy expectation if expected requests was made
     Failure/Error: lambda {
       expected no Exception, got #<RSpec::Expectations::ExpectationNotMetError: The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================>
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:285
     # ./spec/acceptance/shared/request_expectations.rb:606

  6) Webmock with Curb using #http_* methods for requests it should behave like Curb with WebMock when request expectations are set when net connect is allowed should fail request expected not to be made, was made
     Failure/Error: lambda {
       expected RSpec::Expectations::ExpectationNotMetError with message matching /The request GET http:\/\/www.example.com\/ was expected to execute 0 times but it executed 1 time/, got #<RSpec::Expectations::ExpectationNotMetError: The request GET http://www.example.com/ was expected to execute 0 times but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================>
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:285
     # ./spec/acceptance/shared/request_expectations.rb:613

  7) Webmock with Curb using #http_* methods for requests it should behave like Curb with WebMock when webmock is enabled again should register executed requests
     Failure/Error: a_request(:get, "http://www.example.com/").should have_been_made
       The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:285
     # ./spec/acceptance/shared/enabling_and_disabling_webmock.rb:74

  8) Webmock with Curb using #http_* methods for requests it should behave like Curb with WebMock when webmock is disabled except this lib should register executed requests
     Failure/Error: a_request(:get, "http://www.example.com/").should have_been_made
       The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:285
     # ./spec/acceptance/shared/enabling_and_disabling_webmock.rb:74

  9) Webmock with Curb using .http_* methods for requests it should behave like Curb with WebMock when request expectations are set when net connect is allowed should satisfy expectation if expected requests was made
     Failure/Error: lambda {
       expected no Exception, got #<RSpec::Expectations::ExpectationNotMetError: The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================>
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:331
     # ./spec/acceptance/shared/request_expectations.rb:606

  10) Webmock with Curb using .http_* methods for requests it should behave like Curb with WebMock when request expectations are set when net connect is allowed should fail request expected not to be made, was made
     Failure/Error: lambda {
       expected RSpec::Expectations::ExpectationNotMetError with message matching /The request GET http:\/\/www.example.com\/ was expected to execute 0 times but it executed 1 time/, got #<RSpec::Expectations::ExpectationNotMetError: The request GET http://www.example.com/ was expected to execute 0 times but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================>
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:331
     # ./spec/acceptance/shared/request_expectations.rb:613

  11) Webmock with Curb using .http_* methods for requests it should behave like Curb with WebMock when webmock is enabled again should register executed requests
     Failure/Error: a_request(:get, "http://www.example.com/").should have_been_made
       The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:331
     # ./spec/acceptance/shared/enabling_and_disabling_webmock.rb:74

  12) Webmock with Curb using .http_* methods for requests it should behave like Curb with WebMock when webmock is disabled except this lib should register executed requests
     Failure/Error: a_request(:get, "http://www.example.com/").should have_been_made
       The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:331
     # ./spec/acceptance/shared/enabling_and_disabling_webmock.rb:74

  13) Webmock with Curb using .perform for requests it should behave like Curb with WebMock when request expectations are set when net connect is allowed should satisfy expectation if expected requests was made
     Failure/Error: lambda {
       expected no Exception, got #<RSpec::Expectations::ExpectationNotMetError: The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================>
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:336
     # ./spec/acceptance/shared/request_expectations.rb:606

  14) Webmock with Curb using .perform for requests it should behave like Curb with WebMock when request expectations are set when net connect is allowed should fail request expected not to be made, was made
     Failure/Error: lambda {
       expected RSpec::Expectations::ExpectationNotMetError with message matching /The request GET http:\/\/www.example.com\/ was expected to execute 0 times but it executed 1 time/, got #<RSpec::Expectations::ExpectationNotMetError: The request GET http://www.example.com/ was expected to execute 0 times but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================>
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:336
     # ./spec/acceptance/shared/request_expectations.rb:613

  15) Webmock with Curb using .perform for requests it should behave like Curb with WebMock when webmock is enabled again should register executed requests
     Failure/Error: a_request(:get, "http://www.example.com/").should have_been_made
       The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:336
     # ./spec/acceptance/shared/enabling_and_disabling_webmock.rb:74

  16) Webmock with Curb using .perform for requests it should behave like Curb with WebMock when webmock is disabled except this lib should register executed requests
     Failure/Error: a_request(:get, "http://www.example.com/").should have_been_made
       The request GET http://www.example.com/ was expected to execute 1 time but it executed 2 times

       The following requests were made:

       GET http://www.example.com/ was made 2 times

       ============================================================
     Shared Example Group: "Curb" called from ./spec/acceptance/curb/curb_spec.rb:336
     # ./spec/acceptance/shared/enabling_and_disabling_webmock.rb:74

It looks like there's some weird double-request thing going on. I'm not sure if it's truly a bug in WebMock or if its a regression in Curb, so if you discover its a regression feel free to ask the Curb people to fix it on their end.

@myronmarston myronmarston referenced this issue from a commit in myronmarston/webmock
@myronmarston myronmarston Lock to a curb version that doesn't have double-request problems.
Curb 0.7.16 causes 16 tests to fail.  Curb 0.7.15 doesn't.  This
should be fixed at some point, but for now to get the build green
so I can work on other things, I'm locking to 0.7.15.

See issue #136 for more info.
99f0a75
@bblimke
Owner

Fixed.

@bblimke bblimke closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.