increase difference of priority to avoid false nagative test result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c8abe4a054
commit
5c7e691e5d
@ -232,10 +232,10 @@ class TestThread < Test::Unit::TestCase
|
|||||||
def test_priority
|
def test_priority
|
||||||
c1 = c2 = 0
|
c1 = c2 = 0
|
||||||
t1 = Thread.new { loop { c1 += 1 } }
|
t1 = Thread.new { loop { c1 += 1 } }
|
||||||
t1.priority = -1
|
t1.priority = 3
|
||||||
t2 = Thread.new { loop { c2 += 1 } }
|
t2 = Thread.new { loop { c2 += 1 } }
|
||||||
t2.priority = -3
|
t2.priority = -3
|
||||||
assert_equal(-1, t1.priority)
|
assert_equal(3, t1.priority)
|
||||||
assert_equal(-3, t2.priority)
|
assert_equal(-3, t2.priority)
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
5.times do
|
5.times do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user