From b4a9962e85b8b58090f579b9cd9c0f593460f70c Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 16 Oct 2009 03:10:31 +0000 Subject: [PATCH] * test/ruby/test_thread.rb (test_status_and_stop_p): reduce the risk of race condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_thread.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index a0eba3dbd4..c1ae500aee 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -311,11 +311,9 @@ class TestThread < Test::Unit::TestCase assert(c.stop?) d.kill - assert_equal("aborting", d.status) - assert(!d.stop?) + assert_equal(["aborting", false], [d.status, d.stop?]) - assert_equal("run", e.status) - assert(!e.stop?) + assert_equal(["run", false], [e.status, e.stop?]) ensure a.kill if a