From bd77dbc37a2f77c67162065359d39c25e6d4ded7 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 28 May 2014 03:05:48 +0000 Subject: test_thread.rb: move thread switch test * test/ruby/test_thread.rb (test_switch_while_busy_loop): move from test/test_timeout.rb. [Bug #1402] * test/test_timeout.rb (test_timeout): no longer related to [Bug #1402]. [Bug #8523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_timeout.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'test/test_timeout.rb') diff --git a/test/test_timeout.rb b/test/test_timeout.rb index e350762637..e71a09f22c 100644 --- a/test/test_timeout.rb +++ b/test/test_timeout.rb @@ -11,17 +11,11 @@ class TestTimeout < Test::Unit::TestCase end def test_timeout - flag = true - Thread.start { - sleep 1 - flag = false - } - assert_raise(Timeout::Error, "[ruby-dev:38319]") do + assert_raise(Timeout::Error) do Timeout.timeout(0.1) { - Thread.pass while flag + nil while true } end - assert flag, "[ruby-dev:38319]" end def test_cannot_convert_into_time_interval -- cgit v1.2.3