mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 05:55:46 +02:00
Reapply the following commits related to extend timeout value.
66d1900423
0686e4181d
1a63468831
e1fee7f949
232e43fd52
This commit is contained in:
parent
643918ecfe
commit
bcf01b18cf
Notes:
git
2022-12-09 07:36:48 +00:00
1 changed files with 8 additions and 1 deletions
|
@ -325,7 +325,14 @@ line,5,jkl
|
||||||
private
|
private
|
||||||
def assert_parse_errors_out(data, **options)
|
def assert_parse_errors_out(data, **options)
|
||||||
assert_raise(CSV::MalformedCSVError) do
|
assert_raise(CSV::MalformedCSVError) do
|
||||||
Timeout.timeout(0.2) do
|
timeout = 0.2
|
||||||
|
if defined?(RubyVM::YJIT.enabled?) and RubyVM::YJIT.enabled?
|
||||||
|
timeout = 1 # for --yjit-call-threshold=1
|
||||||
|
end
|
||||||
|
if defined?(RubyVM::MJIT.enabled?) and RubyVM::MJIT.enabled?
|
||||||
|
timeout = 5 # for --jit-wait
|
||||||
|
end
|
||||||
|
Timeout.timeout(timeout) do
|
||||||
CSV.parse(data, **options)
|
CSV.parse(data, **options)
|
||||||
fail("Parse didn't error out")
|
fail("Parse didn't error out")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue