diff options
author | Yusuke Endoh <[email protected]> | 2024-05-28 12:04:34 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2024-05-28 12:49:46 +0900 |
commit | 2114d0af1e5790da365584a38ea7ee58670dc11b (patch) | |
tree | a8f88cb4a552657a037c42999ba37342342418f8 | |
parent | 7c6e4bc7ca8a25de801db49eae9cad0c9edb29c0 (diff) |
Make test_nested_timeouts less flaky
This test randomly fails due to the bug reported in [Bug #20314], where
the two timeouts are too close so that they can expire at the same time.
As a workaround, this change increases the time difference between
timeouts. This will reduce the probability of simultaneous expirations
and lower flakiness.
-rw-r--r-- | test/test_timeout.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_timeout.rb b/test/test_timeout.rb index e900b10cd7..34966f92a4 100644 --- a/test/test_timeout.rb +++ b/test/test_timeout.rb @@ -66,7 +66,7 @@ class TestTimeout < Test::Unit::TestCase a = nil assert_raise(Timeout::Error) do Timeout.timeout(0.1) { - Timeout.timeout(1) { + Timeout.timeout(30) { nil while true } a = 1 @@ -84,7 +84,7 @@ class TestTimeout < Test::Unit::TestCase def test_nested_timeout_error_identity begin Timeout.timeout(0.1, MyNewErrorOuter) { - Timeout.timeout(1, MyNewErrorInner) { + Timeout.timeout(30, MyNewErrorInner) { nil while true } } |