mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/net/http/test_http.rb (test_bind_to_local_port): Choose an open
port more reliably. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ed5de3814a
commit
28130c1c63
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Sep 1 21:17:54 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/net/http/test_http.rb (test_bind_to_local_port): Choose an open
|
||||
port more reliably.
|
||||
|
||||
Sun Sep 1 20:32:40 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (big2str_base_poweroftwo): Renamed from
|
||||
|
|
|
@ -910,7 +910,9 @@ class TestNetHTTPLocalBind < Test::Unit::TestCase
|
|||
|
||||
http = Net::HTTP.new(config('host'), config('port'))
|
||||
http.local_host = Addrinfo.tcp(config('host'), config('port')).ip_address
|
||||
http.local_port = [*10000..20000].shuffle.first.to_s
|
||||
http.local_port = Addrinfo.tcp(config('host'), 0).bind {|s|
|
||||
s.local_address.ip_port.to_s
|
||||
}
|
||||
assert_not_nil(http.local_host)
|
||||
assert_not_nil(http.local_port)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue