From ddd83e8462db32b7403470ef92ed73ee0daef02b Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Thu, 31 Mar 2022 12:52:16 +0900 Subject: [PATCH] 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 ``` --- test/date/test_date_parse.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/date/test_date_parse.rb b/test/date/test_date_parse.rb index e594bbf297..d8dcf6e05e 100644 --- a/test/date/test_date_parse.rb +++ b/test/date/test_date_parse.rb @@ -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