From 53a7abe2cd6bd07b816a7a7e2235befd5e1b4446 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Mon, 2 Sep 2019 22:30:12 +0900 Subject: [PATCH] test/drb/drbtest.rb: Skip test_06_timeout on Solaris10s The test seems to have a race condition, which fails on very slow machine like Solaris10s. So skip it. In addition, this change restores timeout guard that was removed at 0660d7cb538cf5284d50f66adfcbd78609839715. This is because the test gets stuck forever when something wrong occurs. It is better to fail the test than stuck. --- test/drb/drbtest.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb index d764bc75db..9ac3e08cdf 100644 --- a/test/drb/drbtest.rb +++ b/test/drb/drbtest.rb @@ -207,12 +207,15 @@ module DRbCore def test_06_timeout skip if RUBY_PLATFORM.include?("armv7l-linux") - ten = Onecky.new(10) - assert_raise(Timeout::Error) do - @there.do_timeout(ten) - end - assert_raise(Timeout::Error) do - @there.do_timeout(ten) + skip if RUBY_PLATFORM.include?("sparc-solaris2.10") + Timeout.timeout(60) do + ten = Onecky.new(10) + assert_raise(Timeout::Error) do + @there.do_timeout(ten) + end + assert_raise(Timeout::Error) do + @there.do_timeout(ten) + end end end