Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Net::HTTP#request to raise Net::OpenTimeout (#12062)
with a TCPSoerver that is only listening to avoid AssertionFailedError on Ubuntu. --- The tests such as `TestNetHTTP_v1_2_chunked#test_timeout_during_non_chunked_streamed_HTTP_session_write` expect to raise a `Net::WriteTimeout` due to a failure in writing to the server. However, on Ubuntu environments, the server immediately returns a "Connection Refused" in such cases. The socket created with `TCPSocket.new` that supports HEv2 catches this immediately and raises a `Net::OpenTimeout`. As a result, these tests fail due to raising a different exception than expected. This PR adds `Net::OpenTimeout` asexceptions to avoid these test failures.
- Loading branch information