ruby/tool/test/testunit/tests_for_parallel/slow_helper.rb
KJ Tsanaktsidis 75234beb24 Make TestParallel#test_retry_workers consider RUBY_TEST_TIMEOUT_SCALE
This test currently fails if RUBY_TEST_TIMEOUT_SCALE is set, because the
worker timeout is scaled out but the duration of the sleep does not;
thus, the test-test-case does not timeout when it should.
2024-03-28 09:48:53 +11:00

8 lines
181 B
Ruby

require 'test/unit'
module TestSlowTimeout
def test_slow
sleep_for = EnvUtil.apply_timeout_scale((ENV['sec'] || 3).to_i)
sleep sleep_for if on_parallel_worker?
end
end