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
This commit is contained in:
Takashi Kokubun 2020-06-21 02:14:32 -07:00
Родитель 426db4cd90
Коммит ec07e2de1a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 6FFC433B12EE23DD
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -1545,6 +1545,7 @@ EOF
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
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
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
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
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
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
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
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
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
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
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
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
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)