mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add method DRbService.ext_service
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
571aa4db39
commit
b7e70f0497
4 changed files with 29 additions and 16 deletions
|
@ -1,3 +1,11 @@
|
|||
Sun Jan 2 01:17:17 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
|
||||
|
||||
* test/drb/drbtest.rb: add method DRbService.ext_service.
|
||||
|
||||
* test/drb/test_drb.rb: ditto.
|
||||
|
||||
* test/drb/test_drbssl.rb: ditto.
|
||||
|
||||
Sat Jan 1 20:23:02 2005 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* io.c (argf_readpartial): new method ARGF.readpartial.
|
||||
|
|
|
@ -30,6 +30,11 @@ class DRbService
|
|||
def self.server
|
||||
@server || @@server
|
||||
end
|
||||
def self.ext_service(name)
|
||||
timeout(5, RuntimeError) do
|
||||
manager.service(name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Onecky
|
||||
|
@ -65,12 +70,12 @@ end
|
|||
|
||||
module DRbCore
|
||||
def setup
|
||||
@ext = DRbService.manager.service('ut_drb.rb')
|
||||
@ext = DRbService.ext_service('ut_drb.rb')
|
||||
@there = @ext.front
|
||||
end
|
||||
|
||||
def teardown
|
||||
@ext.stop_service
|
||||
@ext.stop_service if @ext
|
||||
end
|
||||
|
||||
def test_00_DRbObject
|
||||
|
@ -248,12 +253,12 @@ end
|
|||
|
||||
module DRbAry
|
||||
def setup
|
||||
@ext = DRbService.manager.service('ut_array.rb')
|
||||
@ext = DRbService.ext_service('ut_array.rb')
|
||||
@there = @ext.front
|
||||
end
|
||||
|
||||
def teardown
|
||||
@ext.stop_service
|
||||
@ext.stop_service if @ext
|
||||
end
|
||||
|
||||
def test_01
|
||||
|
|
|
@ -6,12 +6,12 @@ end
|
|||
|
||||
class TestDRbYield < Test::Unit::TestCase
|
||||
def setup
|
||||
@ext = DRbService.manager.service('ut_drb.rb')
|
||||
@ext = DRbService.ext_service('ut_drb.rb')
|
||||
@there = @ext.front
|
||||
end
|
||||
|
||||
def teardown
|
||||
@ext.stop_service
|
||||
@ext.stop_service if @ext
|
||||
end
|
||||
|
||||
def test_01_one
|
||||
|
@ -172,7 +172,7 @@ end
|
|||
|
||||
class TestDRbMServer < Test::Unit::TestCase
|
||||
def setup
|
||||
@ext = DRbService.manager.service('ut_drb.rb')
|
||||
@ext = DRbService.ext_service('ut_drb.rb')
|
||||
@there = @ext.front
|
||||
@server = (1..3).collect do |n|
|
||||
DRb::DRbServer.new(nil, Onecky.new(n.to_s))
|
||||
|
@ -183,7 +183,7 @@ class TestDRbMServer < Test::Unit::TestCase
|
|||
@server.each do |s|
|
||||
s.stop_service
|
||||
end
|
||||
@ext.stop_service
|
||||
@ext.stop_service if @ext
|
||||
end
|
||||
|
||||
def test_01
|
||||
|
@ -194,14 +194,14 @@ end
|
|||
class TestDRbReusePort < TestDRbAry
|
||||
def setup
|
||||
sleep 1.2
|
||||
@ext = DRbService.manager.service('ut_port.rb')
|
||||
@ext = DRbService.ext_service('ut_port.rb')
|
||||
@there = @ext.front
|
||||
end
|
||||
end
|
||||
|
||||
class TestDRbSafe1 < TestDRbAry
|
||||
def setup
|
||||
@ext = DRbService.manager.service('ut_safe1.rb')
|
||||
@ext = DRbService.ext_service('ut_safe1.rb')
|
||||
@there = @ext.front
|
||||
end
|
||||
end
|
||||
|
@ -209,12 +209,12 @@ end
|
|||
class TestDRbEval < Test::Unit::TestCase
|
||||
def setup
|
||||
super
|
||||
@ext = DRbService.manager.service('ut_eval.rb')
|
||||
@ext = DRbService.ext_service('ut_eval.rb')
|
||||
@there = @ext.front
|
||||
end
|
||||
|
||||
def teardown
|
||||
@ext.stop_service
|
||||
@ext.stop_service if @ext
|
||||
end
|
||||
|
||||
def test_01_safe1_eval
|
||||
|
@ -240,12 +240,12 @@ end
|
|||
|
||||
class TestDRbLarge < Test::Unit::TestCase
|
||||
def setup
|
||||
@ext = DRbService.manager.service('ut_large.rb')
|
||||
@ext = DRbService.ext_service('ut_large.rb')
|
||||
@there = @ext.front
|
||||
end
|
||||
|
||||
def teardown
|
||||
@ext.stop_service
|
||||
@ext.stop_service if @ext
|
||||
end
|
||||
|
||||
def test_01_large_ary
|
||||
|
|
|
@ -36,7 +36,7 @@ end
|
|||
class TestDRbSSLCore < Test::Unit::TestCase
|
||||
include DRbCore
|
||||
def setup
|
||||
@ext = DRbSSLService.manager.service('ut_drb_drbssl.rb')
|
||||
@ext = DRbSSLService.ext_service('ut_drb_drbssl.rb')
|
||||
@there = @ext.front
|
||||
end
|
||||
|
||||
|
@ -65,7 +65,7 @@ end
|
|||
class TestDRbSSLAry < Test::Unit::TestCase
|
||||
include DRbAry
|
||||
def setup
|
||||
@ext = DRbSSLService.manager.service('ut_array_drbssl.rb')
|
||||
@ext = DRbSSLService.ext_service('ut_array_drbssl.rb')
|
||||
@there = @ext.front
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue