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
@ -587,12 +587,12 @@ class TestDateParse < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test__parse_too_long_year
|
def test__parse_too_long_year
|
||||||
str = "Jan 1" + "0" * 100_000
|
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(100_000, Math.log10(h[:year]))
|
||||||
assert_equal(1, h[:mon])
|
assert_equal(1, h[:mon])
|
||||||
|
|
||||||
str = "Jan - 1" + "0" * 100_000
|
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_equal(1, h[:mon])
|
||||||
assert_not_include(h, :year)
|
assert_not_include(h, :year)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user