Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix the request building on the timeout helper

Marcello Rochaf4ec9567c005
diff --git a/spec/support/vcr.rb b/spec/support/vcr.rb
index 17861036dd4..27479c6043b 100644
--- a/spec/support/vcr.rb
+++ b/spec/support/vcr.rb
@@ -29,12 +29,13 @@
#++
require "vcr"
+require "httpx"
module VCRTimeoutHelper
def stub_request_with_timeout(method, path_matcher)
- request_mock = HTTPX::Request.new(method.to_s.upcase, "https://example.com")
+ request_mock = OpenProject.httpx.build_request(method.to_s.upcase, "https://example.com")
error_response_mock = HTTPX::ErrorResponse.new(request_mock,
- HTTPX::ConnectTimeoutError.new(60, "timed out while waiting on select"), {})
+ HTTPX::ConnectTimeoutError.new(60, "timed out while waiting on select"))
allow_any_instance_of(HTTPX::Session).to receive(method.to_sym).with(any_args).and_call_original
allow_any_instance_of(HTTPX::Session).to receive(method.to_sym).with(path_matcher, any_args).and_return(error_response_mock)
end