Skip to content

Commit

Permalink
Merge pull request #2744 from newrelic/fix_httpx_130_test_failure
Browse files Browse the repository at this point in the history
Fix for HTTPX 1.3.0 test failure
  • Loading branch information
tannalynn authored Jul 10, 2024
2 parents 3dad37b + a8b153f commit e4417ef
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/multiverse/suites/httpx/httpx_instrumentation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@ def test_finish_with_error
request = Minitest::Mock.new
request.expect :response, :the_response
2.times { request.expect :hash, 1138 }
responses = {request => ::HTTPX::ErrorResponse.new(request, StandardError.new, {})}

error = if Gem::Version.new(::HTTPX::VERSION) >= Gem::Version.new('1.3.0')
request.expect :options, ::HTTPX::Options.new({})
::HTTPX::ErrorResponse.new(request, StandardError.new)
else
::HTTPX::ErrorResponse.new(request, StandardError.new, {})
end
responses = {request => error}

segment = Minitest::Mock.new
def segment.notice_error(_error); end
def segment.process_response_headers(_wrappep); end
Expand Down

0 comments on commit e4417ef

Please sign in to comment.