From 370949aad60e992c26037241c07489c056554ea3 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Tue, 4 May 2021 10:31:19 -0500 Subject: test/net/ftp/test_ftp.rb - fix intermittent MinGW failure Fixes intermittent error as below: [242/838] 5316=test_ftp # terminated with exception (report_on_exception is true): D:/a/ruby/ruby/src/tool/lib/minitest/unit.rb:199:in `assert': Expected # to be nil. (MiniTest::Assertion) from D:/a/ruby/ruby/src/tool/lib/test/unit/core_assertions.rb:504:in `assert' from D:/a/ruby/ruby/src/tool/lib/minitest/unit.rb:299:in `assert_nil' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:430:in `ensure in block in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:431:in `block in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:2539:in `block in create_ftp_server' D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:426:in `write': An existing connection was forcibly closed by the remote host. (Errno::ECONNRESET) from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:426:in `print' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:426:in `block (2 levels) in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:420:in `each' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:420:in `each_with_index' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:420:in `block in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:2539:in `block in create_ftp_server' --- test/net/ftp/test_ftp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/net/ftp') diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index ee64290f2b..5e0eb3dfe6 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -425,7 +425,7 @@ class FTPTest < Test::Unit::TestCase end conn.print(l, "\r\n") end - rescue Errno::EPIPE + rescue Errno::EPIPE, Errno::ECONNRESET ensure assert_nil($!) conn.close -- cgit v1.2.3