[前][次][番号順一覧][スレッド一覧]

ruby-changes:57487

From: Yusuke <ko1@a...>
Date: Mon, 2 Sep 2019 22:34:19 +0900 (JST)
Subject: [ruby-changes:57487] 53a7abe2cd (master): test/drb/drbtest.rb: Skip test_06_timeout on Solaris10s

https://git.ruby-lang.org/ruby.git/commit/?id=53a7abe2cd

From 53a7abe2cd6bd07b816a7a7e2235befd5e1b4446 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Mon, 2 Sep 2019 22:30:12 +0900
Subject: 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.

diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index d764bc7..9ac3e08 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -207,12 +207,15 @@ module DRbCore https://github.com/ruby/ruby/blob/trunk/test/drb/drbtest.rb#L207
 
   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
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]