summaryrefslogtreecommitdiff
path: root/test/drb
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-30 13:30:48 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-30 13:30:48 +0000
commit1eb2a60a3dd8d1bf169251966a356265bb3c0451 (patch)
treee7aae2f5478c3c853522584dc462eea343b249c1 /test/drb
parent6350cbb1b280dd12d7230cc2a176e6d9f722c38b (diff)
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
Diffstat (limited to 'test/drb')
-rw-r--r--test/drb/drbtest.rb11
-rw-r--r--test/drb/ut_drb.rb9
-rw-r--r--test/drb/ut_drb_drbssl.rb2
-rw-r--r--test/drb/ut_drb_drbunix.rb2
4 files changed, 19 insertions, 5 deletions
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index ed952b5..efbdb5b 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -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
diff --git a/test/drb/ut_drb.rb b/test/drb/ut_drb.rb
index 2a121b0..2525aa6 100644
--- a/test/drb/ut_drb.rb
+++ b/test/drb/ut_drb.rb
@@ -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
diff --git a/test/drb/ut_drb_drbssl.rb b/test/drb/ut_drb_drbssl.rb
index b09864a..cd9adf9 100644
--- a/test/drb/ut_drb_drbssl.rb
+++ b/test/drb/ut_drb_drbssl.rb
@@ -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
diff --git a/test/drb/ut_drb_drbunix.rb b/test/drb/ut_drb_drbunix.rb
index ae0674e..8b9484c 100644
--- a/test/drb/ut_drb_drbunix.rb
+++ b/test/drb/ut_drb_drbunix.rb
@@ -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