ruby-changes:23372
From: naruse <ko1@a...>
Date: Sun, 22 Apr 2012 10:46:54 +0900 (JST)
Subject: [ruby-changes:23372] naruse:r35423 (trunk): avoid thread switching.
naruse 2012-04-22 10:46:45 +0900 (Sun, 22 Apr 2012) New Revision: 35423 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35423 Log: avoid thread switching. The test may fail if thread switches to d or e before assertions. Modified files: trunk/test/ruby/test_thread.rb Index: test/ruby/test_thread.rb =================================================================== --- test/ruby/test_thread.rb (revision 35422) +++ test/ruby/test_thread.rb (revision 35423) @@ -439,9 +439,14 @@ assert(c.stop?) d.kill - assert_equal(["aborting", false], [d.status, d.stop?]) + # to avoid thread switching... + ds1 = d.status + ds2 = d.stop? + es1 = e.status + es2 = e.stop? + assert_equal(["aborting", false], [ds1, ds2]) - assert_equal(["run", false], [e.status, e.stop?]) + assert_equal(["run", false], [es1, es2]) ensure a.kill if a -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/