diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_thread.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 043917f2ec..cd99cdc401 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -299,19 +299,22 @@ class TestThread < Test::Unit::TestCase d = Thread.new { sleep } e = Thread.current sleep 0.5 - d.kill assert_equal(nil, a.status) + assert(a.stop?) + assert_equal("sleep", b.status) + assert(b.stop?) + assert_equal(false, c.status) assert_match(/^#<TestThread::Thread:.* dead>$/, c.inspect) - assert_equal("aborting", d.status) - assert_equal("run", e.status) - - assert(a.stop?) - assert(b.stop?) assert(c.stop?) + + d.kill + assert_equal("aborting", d.status) assert(!d.stop?) + + assert_equal("run", e.status) assert(!e.stop?) ensure |