mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/date/test_date_parse.rb: relax the time limit
The timeout was very strict for weak CI machines like qemu-riscv. Due to the additional overhead for Regexp.timeout=, it started failing on such machines. http://rubyci.s3.amazonaws.com/debian-riscv64/ruby-master/log/20220330T200018Z.fail.html.gz ``` 1) Error: TestDateParse#test__parse_too_long_year: Timeout::Error: execution expired ```
This commit is contained in:
parent
217cea7812
commit
ddd83e8462
1 changed files with 2 additions and 2 deletions
|
@ -587,12 +587,12 @@ class TestDateParse < Test::Unit::TestCase
|
|||
|
||||
def test__parse_too_long_year
|
||||
str = "Jan 1" + "0" * 100_000
|
||||
h = EnvUtil.timeout(1) {Date._parse(str, limit: 100_010)}
|
||||
h = EnvUtil.timeout(3) {Date._parse(str, limit: 100_010)}
|
||||
assert_equal(100_000, Math.log10(h[:year]))
|
||||
assert_equal(1, h[:mon])
|
||||
|
||||
str = "Jan - 1" + "0" * 100_000
|
||||
h = EnvUtil.timeout(1) {Date._parse(str, limit: 100_010)}
|
||||
h = EnvUtil.timeout(3) {Date._parse(str, limit: 100_010)}
|
||||
assert_equal(1, h[:mon])
|
||||
assert_not_include(h, :year)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue