diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestIPv6NIOServerSocketChannel.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestIPv6NIOServerSocketChannel.java index d4f4adaa368..e63eaf24e3b 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestIPv6NIOServerSocketChannel.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestIPv6NIOServerSocketChannel.java @@ -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); }