Outer block is required to rescue Timeout::Error

This commit is contained in:
aycabta 2021-08-12 07:52:23 +09:00
Родитель 79cc566ab4
Коммит e5f6cd7045
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -556,9 +556,9 @@ module BasetestReadline
end
end
assert interrupt_suppressed, "Should handle SIGINT correctly but raised interrupt.\nLog: #{log}\n----"
rescue Timeout::Error => e
assert false, "Timed out to handle SIGINT!\nLog: #{log}\nBacktrace:\n#{e.full_message(highlight: false)}\n----"
end
rescue Timeout::Error => e
assert false, "Timed out to handle SIGINT!\nLog: #{log}\nBacktrace:\n#{e.full_message(highlight: false)}\n----"
ensure
status = Process.wait2(pid).last
assert status.success?, "Unknown failure with exit status #{status}\nLog: #{log}\n----"