summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_thread.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 57e02849b9..55667231b1 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -237,13 +237,16 @@ class TestThread < Test::Unit::TestCase
assert_equal(-1, t1.priority)
assert_equal(-3, t2.priority)
sleep 0.5
+
+ r1 = r2 = 0
5.times do
- break if c1 > c2
+ c1 > c2 ? r1+=1 : r2+=1
+ c1 = c2 = 0
sleep 0.1
end
t1.kill
t2.kill
- assert_operator(c1, :>, c2, "[ruby-dev:33124]") # not guaranteed
+ assert_operator(r1, :>, r2, "[ruby-dev:33124]") # not guaranteed
end
def test_new