ruby/tool/test/testunit/tests_for_parallel/test4test_hungup.rb
Peter Zhu 7eeabccf4c Fix TestParallel#test_hungup when RUBY_TEST_TIMEOUT_SCALE is set
When RUBY_TEST_TIMEOUT_SCALE is set, the timeout increases by the multiple
specified. However, the test in test4test_hungup.rb does not scale, so
if RUBY_TEST_TIMEOUT_SCALE is a large number like 10, then the test will
not time out causing the tests test to fail.
2024-10-29 15:34:58 +09:00

15 lines
296 B
Ruby

# frozen_string_literal: true
require_relative '../../../lib/test/unit'
class TestHung < Test::Unit::TestCase
def test_success_at_worker
assert true
end
def test_hungup_at_worker
if on_parallel_worker?
sleep EnvUtil.apply_timeout_scale(10)
end
assert true
end
end