ruby-changes:3293
From: ko1@a...
Date: 30 Dec 2007 03:39:56 +0900
Subject: [ruby-changes:3293] akr - Ruby:r14786 (trunk): use timeout for thread join to avoid hang.
akr 2007-12-30 03:39:43 +0900 (Sun, 30 Dec 2007) New Revision: 14786 Modified files: trunk/test/io/nonblock/test_flush.rb Log: use timeout for thread join to avoid hang. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/io/nonblock/test_flush.rb?r1=14786&r2=14785 Index: test/io/nonblock/test_flush.rb =================================================================== --- test/io/nonblock/test_flush.rb (revision 14785) +++ test/io/nonblock/test_flush.rb (revision 14786) @@ -1,4 +1,5 @@ require 'test/unit' +require 'timeout' begin require 'io/nonblock' rescue LoadError @@ -24,7 +25,9 @@ end } w.flush # assert_raise(IOError, "[ruby-dev:24985]") {w.flush} - assert_nothing_raised {t.join} + timeout(10) { + assert_nothing_raised {t.join} + } assert_equal(4097, result.size) end end if IO.method_defined?(:nonblock) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml