mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Join threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bbfe069ec1
commit
59ae4924b0
4 changed files with 53 additions and 4 deletions
|
@ -32,6 +32,9 @@ class DRbService
|
|||
manager.service(name)
|
||||
end
|
||||
end
|
||||
def self.finish
|
||||
@server.instance_variable_get(:@grp).list.each {|th| th.join }
|
||||
end
|
||||
end
|
||||
|
||||
class Onecky
|
||||
|
@ -193,10 +196,6 @@ module DRbCore
|
|||
assert_raise(TimeoutError) do
|
||||
@there.do_timeout(ten)
|
||||
end
|
||||
ensure
|
||||
DRbService.server.instance_variable_get(:@grp).list.each do |th|
|
||||
th.kill.join
|
||||
end
|
||||
end
|
||||
|
||||
def test_07_public_private_protected_missing
|
||||
|
|
|
@ -9,6 +9,11 @@ class TestDRbCore < Test::Unit::TestCase
|
|||
setup_service 'ut_drb.rb'
|
||||
super
|
||||
end
|
||||
|
||||
def teardown
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
end
|
||||
|
||||
class TestDRbYield < Test::Unit::TestCase
|
||||
|
@ -19,6 +24,11 @@ class TestDRbYield < Test::Unit::TestCase
|
|||
super
|
||||
end
|
||||
|
||||
def teardown
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
|
||||
def test_01_one
|
||||
@there.echo_yield_1([]) {|one|
|
||||
assert_equal([], one)
|
||||
|
@ -187,6 +197,11 @@ class TestDRbAry < Test::Unit::TestCase
|
|||
setup_service 'ut_array.rb'
|
||||
super
|
||||
end
|
||||
|
||||
def teardown
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
end
|
||||
|
||||
class TestDRbMServer < Test::Unit::TestCase
|
||||
|
@ -205,6 +220,7 @@ class TestDRbMServer < Test::Unit::TestCase
|
|||
s.stop_service
|
||||
end
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
|
||||
def test_01
|
||||
|
@ -216,6 +232,11 @@ class TestDRbSafe1 < TestDRbAry
|
|||
def setup
|
||||
setup_service 'ut_safe1.rb'
|
||||
end
|
||||
|
||||
def teardown
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
end
|
||||
|
||||
class TestDRbEval # < Test::Unit::TestCase
|
||||
|
@ -275,6 +296,11 @@ class TestDRbLarge < Test::Unit::TestCase
|
|||
super
|
||||
end
|
||||
|
||||
def teardown
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
|
||||
def test_01_large_ary
|
||||
ary = [2] * 10240
|
||||
assert_equal(10240, @there.size(ary))
|
||||
|
@ -317,6 +343,11 @@ class TestBug4409 < Test::Unit::TestCase
|
|||
super
|
||||
end
|
||||
|
||||
def teardown
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
|
||||
def test_bug4409
|
||||
foo = @there.foo
|
||||
assert(@there.foo?(foo))
|
||||
|
|
|
@ -42,6 +42,11 @@ class TestDRbSSLCore < Test::Unit::TestCase
|
|||
super
|
||||
end
|
||||
|
||||
def teardown
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
|
||||
def test_02_unknown
|
||||
end
|
||||
|
||||
|
@ -58,6 +63,11 @@ class TestDRbSSLAry < Test::Unit::TestCase
|
|||
setup_service 'ut_array_drbssl.rb'
|
||||
super
|
||||
end
|
||||
|
||||
def teardown
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,11 @@ class TestDRbUNIXCore < Test::Unit::TestCase
|
|||
super
|
||||
end
|
||||
|
||||
def teardown
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
|
||||
def test_02_unknown
|
||||
end
|
||||
|
||||
|
@ -42,6 +47,10 @@ class TestDRbUNIXAry < Test::Unit::TestCase
|
|||
setup_service 'ut_array_drbunix.rb'
|
||||
super
|
||||
end
|
||||
def teardown
|
||||
super
|
||||
DRbService.finish
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue