1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add test Hash#each, and change load_limit

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
seki 2003-10-30 13:30:48 +00:00
parent 6350cbb1b2
commit 1eb2a60a3d
4 changed files with 19 additions and 5 deletions

View file

@ -127,7 +127,7 @@ module DRbCore
@there.sum(1, 1, 1, 1, 1, 1, 1, 1, 1)
end
assert_raises(DRb::DRbConnError) do
@there.sum('1' * 2048)
@there.sum('1' * 4096)
end
end
@ -215,8 +215,15 @@ module DRbCore
assert_equal(DRb::DRbURIOption.new('?hello?world'), ro.__drbref)
end
def test_10_yield
@there.simple_hash.each do |k, v|
assert_kind_of(String, k)
assert_kind_of(Symbol, v)
end
end
def test_10_yield_undumped
@there.xarray2_hash.each_pair do |k, v|
@there.xarray2_hash.each do |k, v|
assert_kind_of(String, k)
assert_kind_of(DRbObject, v)
end

View file

@ -107,6 +107,13 @@ class DRbEx
DRbObject.new(@xary2_hash)
end
def simple_hash
unless @hash
@hash = { 'a'=>:a, 'b'=>:b }
end
DRbObject.new(@hash)
end
def [](key)
key.to_s
end
@ -129,7 +136,7 @@ if __FILE__ == $0
end
DRb::DRbServer.default_argc_limit(8)
DRb::DRbServer.default_load_limit(2048)
DRb::DRbServer.default_load_limit(4096)
DRb.start_service(nil, DRbEx.new)
es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)
DRb.thread.join

View file

@ -17,7 +17,7 @@ if __FILE__ == $0
[ ["C","JP"], ["O","Foo.DRuby.Org"], ["CN", "Sample"] ]
DRb::DRbServer.default_argc_limit(8)
DRb::DRbServer.default_load_limit(1024)
DRb::DRbServer.default_load_limit(4096)
DRb.start_service('drbssl://:0', DRbEx.new, config)
es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)
DRb.thread.join

View file

@ -8,7 +8,7 @@ if __FILE__ == $0
end
DRb::DRbServer.default_argc_limit(8)
DRb::DRbServer.default_load_limit(1024)
DRb::DRbServer.default_load_limit(4096)
DRb.start_service('drbunix:', DRbEx.new)
es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)
DRb.thread.join