HBASE-19198 TestIPv6NIOServerSocketChannel fails; unable to bind
This commit is contained in:
parent
b6011a16ff
commit
d1b6d8c906
|
@ -49,7 +49,6 @@ import org.junit.rules.TestRule;
|
|||
*/
|
||||
@Category({MiscTests.class, SmallTests.class})
|
||||
public class TestIPv6NIOServerSocketChannel {
|
||||
|
||||
private static final Log LOG = LogFactory.getLog(TestIPv6NIOServerSocketChannel.class);
|
||||
|
||||
@Rule
|
||||
|
@ -69,6 +68,7 @@ public class TestIPv6NIOServerSocketChannel {
|
|||
break;
|
||||
} catch (BindException ex) {
|
||||
//continue
|
||||
LOG.info("Failed on " + addr + ", inedAddr=" + inetAddr, ex);
|
||||
} finally {
|
||||
if (serverSocket != null) {
|
||||
serverSocket.close();
|
||||
|
@ -151,9 +151,9 @@ public class TestIPv6NIOServerSocketChannel {
|
|||
*/
|
||||
@Test
|
||||
public void testServerSocketFromLocalhostResolution() throws IOException {
|
||||
InetAddress[] addrs = InetAddress.getAllByName("localhost");
|
||||
InetAddress[] addrs = {InetAddress.getLocalHost()};
|
||||
for (InetAddress addr : addrs) {
|
||||
LOG.info("resolved localhost as:" + addr);
|
||||
LOG.info("Resolved localhost as: " + addr);
|
||||
bindServerSocket(addr);
|
||||
bindNIOServerSocket(addr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue