Skip to content
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

add test for timeout while getting from stdin #266

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

emiltin
Copy link
Contributor

@emiltin emiltin commented Aug 9, 2023

Added a test to shows that with_timeout() does not return Async::Timeout() if timing out while getting from stdin.

The test can be run with:

% bundle exec sus test/async/task.rb:599
🏁 Finished in 103.3ms; 9.682 assertions per second.
🐇 No slow tests found! Well done!

🤔 Failed assertions:
describe Async::Task with #with_timeout it will timeout while getting from stdin test/async/task.rb:599
	expect #<Errno::ENOENT: No such file or directory @ io_fillbuf - fd:0 <STDIN>> to
		be is_a? Async::TimeoutError
			✗ assertion failed test/async/task.rb:612

Types of Changes

  • Added a test

Contribution

test/async/task.rb Outdated Show resolved Hide resolved
test/async/task.rb Outdated Show resolved Hide resolved
@ioquatix
Copy link
Member

This test passes with Select, URing and fails on EPoll. Not sure why, investigating.

@ioquatix ioquatix merged commit 7830d3e into socketry:main Aug 25, 2023
3 of 16 checks passed
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.

2 participants