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.
This commit is contained in:
parent
7c6e4bc7ca
commit
2114d0af1e
@ -66,7 +66,7 @@ class TestTimeout < Test::Unit::TestCase
|
|||||||
a = nil
|
a = nil
|
||||||
assert_raise(Timeout::Error) do
|
assert_raise(Timeout::Error) do
|
||||||
Timeout.timeout(0.1) {
|
Timeout.timeout(0.1) {
|
||||||
Timeout.timeout(1) {
|
Timeout.timeout(30) {
|
||||||
nil while true
|
nil while true
|
||||||
}
|
}
|
||||||
a = 1
|
a = 1
|
||||||
@ -84,7 +84,7 @@ class TestTimeout < Test::Unit::TestCase
|
|||||||
def test_nested_timeout_error_identity
|
def test_nested_timeout_error_identity
|
||||||
begin
|
begin
|
||||||
Timeout.timeout(0.1, MyNewErrorOuter) {
|
Timeout.timeout(0.1, MyNewErrorOuter) {
|
||||||
Timeout.timeout(1, MyNewErrorInner) {
|
Timeout.timeout(30, MyNewErrorInner) {
|
||||||
nil while true
|
nil while true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user