summaryrefslogtreecommitdiff
path: root/test/xmlrpc/test_cookie.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-09 09:07:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-09 09:07:41 +0000
commitb30ff6839db848efafc4b7b61abed0e2708d2627 (patch)
tree49c5d6117186319a90b65773b221904882029dfb /test/xmlrpc/test_cookie.rb
parenta4b5982b4c95b0c6779748bf010aa7445714f343 (diff)
* test/xmlrpc: Use assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/xmlrpc/test_cookie.rb')
-rw-r--r--test/xmlrpc/test_cookie.rb22
1 files changed, 10 insertions, 12 deletions
diff --git a/test/xmlrpc/test_cookie.rb b/test/xmlrpc/test_cookie.rb
index 4f5e17a1b5d..cfcfe4c3f0b 100644
--- a/test/xmlrpc/test_cookie.rb
+++ b/test/xmlrpc/test_cookie.rb
@@ -66,22 +66,20 @@ class TestCookie < Test::Unit::TestCase
s
end
- def setup_http_server
+ def setup_http_server_option
option = {:Port => 0}
-
- addr = start_server(option) {|w| w.mount('/RPC2', create_servlet) }
-
- @s = XMLRPC::Client.new3(:host => addr.ip_address, :port => addr.ip_port)
end
def test_cookie
- begin
- setup_http_server
- do_test
- ensure
- @s.http.finish
- stop_server
- end
+ option = setup_http_server_option
+ with_server(option, create_servlet) {|addr|
+ begin
+ @s = XMLRPC::Client.new3(:host => addr.ip_address, :port => addr.ip_port)
+ do_test
+ ensure
+ @s.http.finish
+ end
+ }
end
def do_test