summaryrefslogtreecommitdiff
path: root/test/xmlrpc/test_cookie.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/xmlrpc/test_cookie.rb')
-rw-r--r--test/xmlrpc/test_cookie.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/xmlrpc/test_cookie.rb b/test/xmlrpc/test_cookie.rb
index 51f0be0..11bf10e 100644
--- a/test/xmlrpc/test_cookie.rb
+++ b/test/xmlrpc/test_cookie.rb
@@ -66,18 +66,17 @@ class TestCookie < Test::Unit::TestCase
s
end
- def setup_http_server(port)
- option = {:Port => port}
+ def setup_http_server
+ option = {:Port => 0}
- start_server(option) {|w| w.mount('/RPC2', create_servlet) }
+ addr = start_server(option) {|w| w.mount('/RPC2', create_servlet) }
- @s = XMLRPC::Client.new3(:port => port)
+ @s = XMLRPC::Client.new3(:host => addr.ip_address, :port => addr.ip_port)
end
- PORT = 8070
def test_cookie
begin
- setup_http_server(PORT)
+ setup_http_server
do_test
ensure
stop_server