ruby-changes:61880
From: Takashi <ko1@a...>
Date: Sun, 21 Jun 2020 18:15:15 +0900 (JST)
Subject: [ruby-changes:61880] ec07e2de1a (master): Increase read timeout of FTP tests with --jit-wait
https://git.ruby-lang.org/ruby.git/commit/?id=ec07e2de1a From ec07e2de1a15ac8ab54b6275c8d09aa615fbb1db Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Sun, 21 Jun 2020 02:14:32 -0700 Subject: Increase read timeout of FTP tests with --jit-wait Trying to eliminate some newer random failures http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3016543 diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index e75e7e5..0907df5 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -1545,6 +1545,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L1545 begin begin ftp = Net::FTP.new + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait ftp.connect(SERVER_ADDR, server.port) assert_equal(['LANG EN*', 'UTF8'], ftp.features) assert_equal("FEAT\r\n", commands.shift) @@ -1567,6 +1568,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L1568 begin begin ftp = Net::FTP.new + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait ftp.connect(SERVER_ADDR, server.port) assert_raise(Net::FTPPermError) do ftp.features @@ -1592,6 +1594,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L1594 begin begin ftp = Net::FTP.new + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait ftp.connect(SERVER_ADDR, server.port) ftp.option("UTF8", "ON") assert_equal("OPTS UTF8 ON\r\n", commands.shift) @@ -1650,6 +1653,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L1653 begin begin ftp = Net::FTP.new + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait ftp.connect(SERVER_ADDR, server.port) entry = ftp.mlst("foo") assert_equal("/foo", entry.pathname) @@ -1736,6 +1740,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L1740 begin begin ftp = Net::FTP.new + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait ftp.connect(SERVER_ADDR, server.port) ftp.login assert_match(/\AUSER /, commands.shift) @@ -1774,6 +1779,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L1779 def test_parse257 ftp = Net::FTP.new + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait assert_equal('/foo/bar', ftp.send(:parse257, '257 "/foo/bar" directory created')) assert_equal('/foo/bar"baz', @@ -1912,6 +1918,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L1918 port: port, ssl: { ca_file: CA_FILE }, passive: false) + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait begin assert_equal("AUTH TLS\r\n", commands.shift) assert_equal("PBSZ 0\r\n", commands.shift) @@ -1996,6 +2003,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2003 port: port, ssl: { ca_file: CA_FILE }, passive: true) + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait begin assert_equal("AUTH TLS\r\n", commands.shift) assert_equal("PBSZ 0\r\n", commands.shift) @@ -2071,6 +2079,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2079 ssl: { ca_file: CA_FILE }, private_data_connection: false, passive: false) + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait begin assert_equal("AUTH TLS\r\n", commands.shift) ftp.login @@ -2140,6 +2149,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2149 ssl: { ca_file: CA_FILE }, private_data_connection: false, passive: true) + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait begin assert_equal("AUTH TLS\r\n", commands.shift) ftp.login @@ -2332,6 +2342,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2342 chdir_to_tmpdir do begin ftp = Net::FTP.new + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait ftp.connect(SERVER_ADDR, server.port) ftp.login assert_match(/\AUSER /, commands.shift) @@ -2382,7 +2393,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2393 File.binwrite("./|echo hello", binary_data) begin ftp = Net::FTP.new - ftp.read_timeout = 0.2 + ftp.read_timeout = RubyVM::MJIT.enabled? ? 300 : 0.2 # use large timeout for --jit-wait ftp.connect(SERVER_ADDR, server.port) ftp.login assert_match(/\AUSER /, commands.shift) @@ -2437,6 +2448,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2448 end begin ftp = Net::FTP.new + ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait ftp.connect(SERVER_ADDR, server.port) ftp.login assert_match(/\AUSER /, commands.shift) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/