Files
Takashi Kokubun bcd1479670 Fix random Broken pipe error in TestOpenURI#test_read_timeout
The server thread writes the HTTP response while the client has a
0.1s read_timeout. On slow CI (especially Windows), the client can
time out and close the socket before the server finishes writing
headers or the response body, causing Errno::EPIPE in the server
thread. Since the broken pipe is expected when the client times out,
rescue it along with ECONNRESET and ECONNABORTED.

This attempts to mitigate random CI failures like:
https://github.com/ruby/ruby/actions/runs/23921136139/job/69767484567?pr=16648

    1) Error:
  TestOpenURI#test_read_timeout:
  Test::Unit::ProxyError: Broken pipe
      D:/a/ruby/ruby/src/test/open-uri/test_open-uri.rb:80:in 'IO#write'
      D:/a/ruby/ruby/src/test/open-uri/test_open-uri.rb:80:in 'IO#print'
      D:/a/ruby/ruby/src/test/open-uri/test_open-uri.rb:80:in 'block (2 levels) in TestOpenURI#test_read_timeout'
2026-04-02 14:29:32 -07:00
..
2024-11-25 08:00:03 +00:00
2024-11-25 08:00:03 +00:00
2024-07-17 17:37:57 +09:00
2024-07-17 17:37:57 +09:00