[前][次][番号順一覧][スレッド一覧]

ruby-changes:21775

From: naruse <ko1@a...>
Date: Thu, 24 Nov 2011 09:46:44 +0900 (JST)
Subject: [ruby-changes:21775] naruse:r33824 (trunk): increase difference of priority to avoid false nagative test result.

naruse	2011-11-24 09:46:34 +0900 (Thu, 24 Nov 2011)

  New Revision: 33824

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33824

  Log:
    increase difference of priority to avoid false nagative test result.

  Modified files:
    trunk/test/ruby/test_thread.rb

Index: test/ruby/test_thread.rb
===================================================================
--- test/ruby/test_thread.rb	(revision 33823)
+++ test/ruby/test_thread.rb	(revision 33824)
@@ -232,10 +232,10 @@
   def test_priority
     c1 = c2 = 0
     t1 = Thread.new { loop { c1 += 1 } }
-    t1.priority = -1
+    t1.priority = 3
     t2 = Thread.new { loop { c2 += 1 } }
     t2.priority = -3
-    assert_equal(-1, t1.priority)
+    assert_equal(3, t1.priority)
     assert_equal(-3, t2.priority)
     sleep 0.5
     5.times do

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]