Jun Aruga 78c9d9e324 Give an option to increase the timeout in tests.
Because setting the option makes some tests stable that are currently randomly
failing with error on especially s390x and aarch64.

We observed the failing tests are calling `assert_in_out_err` method
calling `invoke_ruby` calling method.

Then when the `th_stdout.join(timeout)` or `th_stderr.join(timeout)` returns
`nil` as thread timeout in `invoke_ruby` method, it causes the error. [1][2]

The `test_timeout_scale` macro is to set the environment variable
`RUBY_TEST_TIMEOUT_SCALE` to increase the timeout in `apply_timeout_scale`
method as <new timeout> = <timeout> * <timeout scale>.

As an example, `TestBugReporter#test_bug_reporter_add` test's
maximum thread timeout was 56+ seconds for the default timeout 10 seconds. [3]
In this case setting `RUBY_TEST_TIMEOUT_SCALE=6` (6 * 10 = 60) is good enough
for 56+ seconds.

[1] https://github.com/ruby/ruby/blob/v2_7_1/tool/lib/envutil.rb#L149
[2] https://bugs.ruby-lang.org/issues/16492#note-8
[3] https://bugs.ruby-lang.org/issues/16492#note-4
2020-08-05 14:23:50 +02:00
2016-01-05 11:00:48 +01:00
2020-01-15 16:26:13 +01:00
2018-02-13 13:50:15 +01:00
2018-02-13 13:50:15 +01:00
2019-01-17 08:31:01 +01:00
2020-04-01 21:06:53 +02:00
2017-01-09 15:58:21 +01:00
Description
Languages
RPM Spec 60.1%
Diff 32.7%
Ruby 7.2%