diff --git a/ChangeLog b/ChangeLog index bae63efa88..5a01454e3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jul 14 17:37:01 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_time.rb (TestTime#test_time_interval): add timeout + to avoid stopping tests. + Mon Jul 14 15:18:30 2008 NARUSE, Yui * transcode.c (get_replacement_character): temporary function, diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index c0620323fc..fe62f6a5b1 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -1,5 +1,6 @@ require 'test/unit' require 'rational' +require 'timeout' class TestTime < Test::Unit::TestCase def test_time_add() @@ -217,7 +218,11 @@ class TestTime < Test::Unit::TestCase def test_time_interval m = Mutex.new.lock - assert_nothing_raised { m.sleep(0) } + assert_nothing_raised { + Timeout.timeout(10) { + m.sleep(0) + } + } assert_raise(ArgumentError) { m.sleep(-1) } end