summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-11-24 18:08:42 +0900
committergit <svn-admin@ruby-lang.org>2022-02-25 19:52:33 +0900
commitd4f32b6b7b6be8c0508cf0e7d50ae7ccd14f555a (patch)
tree087b7ab42e51be710d22a7150d75b8b7e226a678 /test
parent4933d7fe565c5815febabf16603a9148abcf88d6 (diff)
[ruby/date] Scale timeouts
https://github.com/ruby/date/commit/2889698e2f
Diffstat (limited to 'test')
-rw-r--r--test/date/test_date_parse.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/date/test_date_parse.rb b/test/date/test_date_parse.rb
index 9a03ca8314..574ead331e 100644
--- a/test/date/test_date_parse.rb
+++ b/test/date/test_date_parse.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require 'test/unit'
require 'date'
-require 'timeout'
+require 'envutil'
class TestDateParse < Test::Unit::TestCase
@@ -587,12 +587,12 @@ class TestDateParse < Test::Unit::TestCase
def test__parse_too_long_year
str = "Jan 1" + "0" * 100_000
- h = Timeout.timeout(1) {Date._parse(str, limit: 100_010)}
+ h = EnvUtil.timeout(1) {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 = Timeout.timeout(1) {Date._parse(str, limit: 100_010)}
+ h = EnvUtil.timeout(1) {Date._parse(str, limit: 100_010)}
assert_equal(1, h[:mon])
assert_not_include(h, :year)
end