summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_thread.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-04 19:01:41 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-04 19:01:41 +0000
commit05527639d03daa8156e3c388cce2b47d4dfb5478 (patch)
tree0e1312e1f94715d7e8388a79b3f0e57af360cb7c /test/ruby/test_thread.rb
parentba6f3a5f06dc488fc4a33a652e5a35b0cbe906ee (diff)
downloadruby-05527639d03daa8156e3c388cce2b47d4dfb5478.tar.gz
ruby-05527639d03daa8156e3c388cce2b47d4dfb5478.tar.xz
ruby-05527639d03daa8156e3c388cce2b47d4dfb5478.zip
Decrease counts of tests which spend so long time.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r--test/ruby/test_thread.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index c1ae500ae..bae1f0038 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -30,7 +30,7 @@ class TestThread < Test::Unit::TestCase
def test_mutex_synchronize
m = Mutex.new
r = 0
- max = 100
+ max = 10
(1..max).map{
Thread.new{
i=0
@@ -108,7 +108,7 @@ class TestThread < Test::Unit::TestCase
$:.unshift File.join(File.dirname(dir), 'ruby')
require 'envutil'
$:.shift
- 10.times {
+ 3.times {
result = `#{EnvUtil.rubybin} #{lbtest}`
assert(!$?.coredump?, '[ruby-dev:30653]')
assert_equal("exit.", result[/.*\Z/], '[ruby-dev:30653]')
@@ -124,6 +124,10 @@ class TestThread < Test::Unit::TestCase
assert_equal(-1, t1.priority)
assert_equal(-3, t2.priority)
sleep 0.5
+ 5.times do
+ break if c1 > c2
+ sleep 0.1
+ end
t1.kill
t2.kill
assert(c1 > c2, "[ruby-dev:33124]")