Decide by majority.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
73a1e841d6
commit
dcea3a0fb2
@ -237,13 +237,16 @@ class TestThread < Test::Unit::TestCase
|
|||||||
assert_equal(-1, t1.priority)
|
assert_equal(-1, t1.priority)
|
||||||
assert_equal(-3, t2.priority)
|
assert_equal(-3, t2.priority)
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
|
||||||
|
r1 = r2 = 0
|
||||||
5.times do
|
5.times do
|
||||||
break if c1 > c2
|
c1 > c2 ? r1+=1 : r2+=1
|
||||||
|
c1 = c2 = 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
end
|
end
|
||||||
t1.kill
|
t1.kill
|
||||||
t2.kill
|
t2.kill
|
||||||
assert_operator(c1, :>, c2, "[ruby-dev:33124]") # not guaranteed
|
assert_operator(r1, :>, r2, "[ruby-dev:33124]") # not guaranteed
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_new
|
def test_new
|
||||||
|
Loading…
x
Reference in New Issue
Block a user