Skip to content

Modernize code #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 1, 2025
Merged

Modernize code #4

merged 3 commits into from
Jul 1, 2025

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Jul 1, 2025

Due to recent changes in Ruby (support for fiber_interrupt), the after block can raise an exception:

describe Async::HTTP::Faraday::Adapter with a local http server with a no content response it properly handles no content responses test/async/http/faraday/adapter.rb:132
	expect "" to
		be == ""
			✓ assertion passed test/async/http/faraday/adapter.rb:133
	⚠ IOError: stream closed in another thread
describe Async::HTTP::Faraday::Adapter with a local http server with a slow response it client can get resource test/async/http/faraday/adapter.rb:145
	expect "Hello World" to
		be == "Hello World"
			✓ assertion passed test/async/http/faraday/adapter.rb:146
	⚠ IOError: stream closed in another thread
describe Async::HTTP::Faraday::Adapter with a local http server with a slow response it raises an exception if request times out test/async/http/faraday/adapter.rb:149
	expect #<Proc:0x00007f107d393b38 test/async/http/faraday/adapter.rb:150> to
		raise exception Faraday::TimeoutError
			✓ raised test/async/http/faraday/adapter.rb:152
	⚠ IOError: stream closed in another thread
describe Async::HTTP::Faraday::Adapter with a local http server with a config block it invokes the config block test/async/http/faraday/adapter.rb:192
	expect true to
		be == true
			✓ assertion passed test/async/http/faraday/adapter.rb:203
	⚠ IOError: stream closed in another thread

Types of Changes

  • Bug fix.
  • Maintenance.

Contribution

@ioquatix ioquatix merged commit 6cd2f7c into main Jul 1, 2025
36 of 40 checks passed
@ioquatix ioquatix deleted the modernize-code branch July 1, 2025 10:15
@ioquatix
Copy link
Member Author

ioquatix commented Jul 1, 2025

For reference, it was found when fixing this: socketry/async-http-faraday#52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant