diff options
Diffstat (limited to 'test/net/ftp')
-rw-r--r-- | test/net/ftp/test_ftp.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index d40e2d8283..fb9852e63d 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -2107,22 +2107,19 @@ EOF commands = [] sock = nil @thread = Thread.start do - begin - sock = server.accept - sock.print("220 (test_ftp).\r\n") - commands.push(sock.gets) - sock.print("234 AUTH success.\r\n") - rescue SystemCallError, IOError - # may be raised by broken connection - end + sock = server.accept + sock.print("220 (test_ftp).\r\n") + commands.push(sock.gets) + sock.print("234 AUTH success.\r\n") end begin assert_raise(Net::OpenTimeout) do Net::FTP.new("localhost", port: port, ssl: { ca_file: CA_FILE }, - open_timeout: 0.1) + ssl_handshake_timeout: 0.1) end + @thread.join ensure sock.close if sock server.close |