Compare commits

...

2 Commits

Author SHA1 Message Date
HoneyryderChuck
bc975f7b9b Merge branch 'catlee/empty_parallel' into 'master'
Exit from run early if we have no handlers

Closes #226

See merge request os85/httpx!239
2023-02-03 16:02:55 +00:00
Chris AtLee
563b8e93c2 Exit from run early if we have no handlers
Fixes: #226
2023-02-03 10:18:16 -05:00
2 changed files with 7 additions and 0 deletions

View File

@ -169,6 +169,8 @@ module Faraday
end
def run
return unless @handlers.last
env = @handlers.last.env
session = HTTPX.session.with(options_from_env(env))

View File

@ -45,6 +45,11 @@ class FaradayTest < Minitest::Test
refute_nil resp1.env[:error]
end
def test_adapter_in_parallel_no_requests
connection = create_connection
assert_nil(connection.in_parallel {})
end
def test_adapter_get_handles_compression
res = get(build_path("/gzip"))
assert JSON.parse(res.body.to_s)["gzipped"]