1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/net/ftp/test_ftp.rb: reduce the size of a long response

"9" * 999999999 (about 1 GB) was too large for some CI servers.
This commit changes the size to 999999 (about 1 MB).

http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20210427T141707Z.fail.html.gz
http://rubyci.s3.amazonaws.com/raspbian10-aarch64/ruby-master/log/20210427T145408Z.fail.html.gz
This commit is contained in:
Yusuke Endoh 2021-04-28 03:12:48 +09:00
parent fe11031b67
commit 8e2ac2140d

View file

@ -2515,12 +2515,12 @@ EOF
s = "20371231000000.123456"
assert_equal(Time.utc(2037, 12, 31, 0, 0, 0, 123456),
Net::FTP::TIME_PARSER[s])
s = "20371231000000." + "9" * 999999999
s = "20371231000000." + "9" * 999999
assert_equal(Time.utc(2037, 12, 31, 0, 0, 0,
99999999999999999r / 100000000000),
Net::FTP::TIME_PARSER[s])
e = assert_raise(Net::FTPProtoError) {
Net::FTP::TIME_PARSER["x" * 999999999]
Net::FTP::TIME_PARSER["x" * 999999]
}
assert_equal("invalid time-val: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...", e.message)
end