socketry / async

An awesome asynchronous event-driven reactor for Ruby.
MIT License
2.04k stars 85 forks source link

add test for timeout while getting from stdin #266

Closed emiltin closed 10 months ago

emiltin commented 11 months ago

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

Contribution

ioquatix commented 10 months ago

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