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

ruby-changes:51038

From: normal <ko1@a...>
Date: Mon, 23 Apr 2018 14:54:11 +0900 (JST)
Subject: [ruby-changes:51038] normal:r63245 (trunk): test/ruby/test_io.rb: add extra Thread#join to delay close

normal	2018-04-23 14:54:06 +0900 (Mon, 23 Apr 2018)

  New Revision: 63245

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63245

  Log:
    test/ruby/test_io.rb: add extra Thread#join to delay close
    
    Maybe this fixes some CI failures.  Also, use different timeouts
    for each item for hopefully easier diagnosis.

  Modified files:
    trunk/test/ruby/test_io.rb
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 63244)
+++ test/ruby/test_io.rb	(revision 63245)
@@ -3769,7 +3769,7 @@ __END__ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L3769
           IO.pipe do |r, w|
             th = Thread.new { r.sysread(1) }
             w.write(dot)
-            assert_same th, th.join(30), '"good" reader timeout'
+            assert_same th, th.join(15), '"good" reader timeout'
             assert_equal(dot, th.value)
           end
         end
@@ -3786,13 +3786,14 @@ __END__ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L3786
             end
           end
           Thread.pass until th.stop?
+          assert_nil th.join(0.001)
           r.close
           assert_same th, th.join(30), '"bad" reader timeout'
           assert_match(/stream closed/, th.value.message)
         end
       end
       sig_wr.write 'done'
-      assert_same noex, noex.join(30), '"good" writer timeout'
+      assert_same noex, noex.join(20), '"good" writer timeout'
       assert_equal 'done', noex.value ,'r63216'
     end
   end

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

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