test/test_socket.rb#test_nil_hostname_and_no_flags_returns_localhost is broken
------------------------------------------------------------------------------
Key: JRUBY-4309
URL: http://jira.codehaus.org/browse/JRUBY-4309
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.4
Reporter: Wayne Meissner
Assignee: Thomas E Enebo
Fix For: JRuby 1.5
This test fails on a fresh ubuntu 9.10 install, OpenSolaris (and possibly
others).
The relevant line from /etc/hosts is:
127.0.0.1 myactualhostname localhost.localdomain localhost
And the output from ruby1.8 -rsocket -e 'p Socket::getaddrinfo(nil, 7789,
Socket::AF_UNSPEC, Socket::SOCK_STREAM, 0)' is:
[["AF_INET", 7789, "myactualhostname", "127.0.0.1", 2, 1, 6]]
The output from jruby is identical to the ruby one, but this test brokenly
assumes that the hostname listed will always be 'localhost'.
I would posit that getaddrinfo is broken by only returning a single element in
the array, it should return an entry for each hostname, and the resulting array
should be searched for one containing localhost.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email