ruby-changes:31642
From: akr <ko1@a...>
Date: Tue, 19 Nov 2013 21:29:54 +0900 (JST)
Subject: [ruby-changes:31642] akr:r43721 (trunk): * test/net/http/utils.rb (spawn_server): Specify zero for port to
akr 2013-11-19 21:29:46 +0900 (Tue, 19 Nov 2013) New Revision: 43721 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43721 Log: * test/net/http/utils.rb (spawn_server): Specify zero for port to avoid reusing an allocated port. * test/net/http/test_http.rb: Don't specify port here. * test/net/http/test_https.rb: Ditto. Modified files: trunk/ChangeLog trunk/test/net/http/test_http.rb trunk/test/net/http/test_https.rb trunk/test/net/http/utils.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 43720) +++ ChangeLog (revision 43721) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Nov 19 21:27:33 2013 Tanaka Akira <akr@f...> + + * test/net/http/utils.rb (spawn_server): Specify zero for port to + avoid reusing an allocated port. + + * test/net/http/test_http.rb: Don't specify port here. + + * test/net/http/test_https.rb: Ditto. + Tue Nov 19 18:52:10 2013 Koichi Sasada <ko1@a...> * gc.c (heap_is_swept_object): use heap_page::before_sweep flag. Index: test/net/http/test_http.rb =================================================================== --- test/net/http/test_http.rb (revision 43720) +++ test/net/http/test_http.rb (revision 43721) @@ -700,7 +700,6 @@ end https://github.com/ruby/ruby/blob/trunk/test/net/http/test_http.rb#L700 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 https://github.com/ruby/ruby/blob/trunk/test/net/http/test_http.rb#L717 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 https://github.com/ruby/ruby/blob/trunk/test/net/http/test_http.rb#L747 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 https://github.com/ruby/ruby/blob/trunk/test/net/http/test_http.rb#L831 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 https://github.com/ruby/ruby/blob/trunk/test/net/http/test_http.rb#L882 class TestNetHTTPLocalBind < Test::Unit::TestCase CONFIG = { 'host' => 'localhost', - 'port' => 0, 'proxy_host' => nil, 'proxy_port' => nil, } Index: test/net/http/utils.rb =================================================================== --- test/net/http/utils.rb (revision 43720) +++ test/net/http/utils.rb (revision 43721) @@ -46,7 +46,7 @@ module TestNetHTTPUtils https://github.com/ruby/ruby/blob/trunk/test/net/http/utils.rb#L46 @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 https://github.com/ruby/ruby/blob/trunk/test/net/http/utils.rb#L65 @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 Index: test/net/http/test_https.rb =================================================================== --- test/net/http/test_https.rb (revision 43720) +++ test/net/http/test_https.rb (revision 43721) @@ -24,7 +24,6 @@ class TestNetHTTPS < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/net/http/test_https.rb#L24 CONFIG = { 'host' => '127.0.0.1', - 'port' => 0, 'proxy_host' => nil, 'proxy_port' => nil, 'ssl_enable' => true, -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/