summaryrefslogtreecommitdiff
path: root/test/net/http
diff options
context:
space:
mode:
Diffstat (limited to 'test/net/http')
-rw-r--r--test/net/http/test_http.rb5
-rw-r--r--test/net/http/test_https.rb1
-rw-r--r--test/net/http/utils.rb4
3 files changed, 2 insertions, 8 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index fc6d50628e..6c847dba7e 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -700,7 +700,6 @@ end
class TestNetHTTP_v1_2 < Test::Unit::TestCase
CONFIG = {
'host' => '127.0.0.1',
- 'port' => 0,
'proxy_host' => nil,
'proxy_port' => nil,
}
@@ -718,7 +717,6 @@ end
class TestNetHTTP_v1_2_chunked < Test::Unit::TestCase
CONFIG = {
'host' => '127.0.0.1',
- 'port' => 0,
'proxy_host' => nil,
'proxy_port' => nil,
'chunked' => true,
@@ -749,7 +747,6 @@ end
class TestNetHTTPContinue < Test::Unit::TestCase
CONFIG = {
'host' => '127.0.0.1',
- 'port' => 0,
'proxy_host' => nil,
'proxy_port' => nil,
'chunked' => true,
@@ -834,7 +831,6 @@ end
class TestNetHTTPKeepAlive < Test::Unit::TestCase
CONFIG = {
'host' => '127.0.0.1',
- 'port' => 0,
'proxy_host' => nil,
'proxy_port' => nil,
'RequestTimeout' => 1,
@@ -886,7 +882,6 @@ end
class TestNetHTTPLocalBind < Test::Unit::TestCase
CONFIG = {
'host' => 'localhost',
- 'port' => 0,
'proxy_host' => nil,
'proxy_port' => nil,
}
diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb
index b711582b99..0a448dd95d 100644
--- a/test/net/http/test_https.rb
+++ b/test/net/http/test_https.rb
@@ -24,7 +24,6 @@ class TestNetHTTPS < Test::Unit::TestCase
CONFIG = {
'host' => '127.0.0.1',
- 'port' => 0,
'proxy_host' => nil,
'proxy_port' => nil,
'ssl_enable' => true,
diff --git a/test/net/http/utils.rb b/test/net/http/utils.rb
index 02e99d45fb..592bbd21cc 100644
--- a/test/net/http/utils.rb
+++ b/test/net/http/utils.rb
@@ -46,7 +46,7 @@ module TestNetHTTPUtils
@config = self.class::CONFIG
server_config = {
:BindAddress => config('host'),
- :Port => config('port'),
+ :Port => 0,
:Logger => WEBrick::Log.new(NullWriter.new),
:AccessLog => [],
:ShutdownSocketWithoutClose => true,
@@ -65,7 +65,7 @@ module TestNetHTTPUtils
@server = WEBrick::HTTPServer.new(server_config)
@server.mount('/', Servlet, config('chunked'))
@server.start
- @config['port'] = @server[:Port] if @config['port'] == 0
+ @config['port'] = @server[:Port]
n_try_max = 5
begin
TCPSocket.open(config('host'), config('port')).close