diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-09 09:07:41 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-09 09:07:41 +0000 |
commit | b30ff6839db848efafc4b7b61abed0e2708d2627 (patch) | |
tree | 49c5d6117186319a90b65773b221904882029dfb /test/xmlrpc/test_webrick_server.rb | |
parent | a4b5982b4c95b0c6779748bf010aa7445714f343 (diff) | |
download | ruby-b30ff6839db848efafc4b7b61abed0e2708d2627.tar.gz |
* 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_webrick_server.rb')
-rw-r--r-- | test/xmlrpc/test_webrick_server.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/xmlrpc/test_webrick_server.rb b/test/xmlrpc/test_webrick_server.rb index 0877ad2e6a..36d64d5093 100644 --- a/test/xmlrpc/test_webrick_server.rb +++ b/test/xmlrpc/test_webrick_server.rb @@ -47,7 +47,7 @@ class Test_Webrick < Test::Unit::TestCase return s end - def setup_http_server(use_ssl) + def setup_http_server_option(use_ssl) option = { :BindAddress => "localhost", :Port => 0, @@ -61,14 +61,14 @@ class Test_Webrick < Test::Unit::TestCase ) end - start_server(option) {|w| w.mount('/RPC2', create_servlet) } + option end def test_client_server # NOTE: I don't enable SSL testing as this hangs [false].each do |use_ssl| - begin - addr = setup_http_server(use_ssl) + option = setup_http_server_option(use_ssl) + with_server(option, create_servlet) {|addr| @s = XMLRPC::Client.new3(:host => addr.ip_address, :port => addr.ip_port, :use_ssl => use_ssl) @s.user = 'admin' @s.password = 'admin' @@ -83,9 +83,7 @@ class Test_Webrick < Test::Unit::TestCase do_test end @s.http.finish - ensure - stop_server - end + } end end |