From a826f41e8307cd4349669b8ecc42eec73e79ccce Mon Sep 17 00:00:00 2001 From: stack Date: Wed, 5 Jun 2019 12:53:20 -0700 Subject: [PATCH] HBASE-22546 TestRegionServerHostname#testRegionServerHostname fails reliably for me --- .../hadoop/hbase/regionserver/TestRegionServerHostname.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerHostname.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerHostname.java index a90b40a2aa7..70d420288bc 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerHostname.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerHostname.java @@ -96,11 +96,12 @@ public class TestRegionServerHostname { // iterate through host addresses and use each as hostname while (addrList.hasMoreElements()) { InetAddress addr = addrList.nextElement(); - if (addr.isLoopbackAddress() || addr.isLinkLocalAddress() || addr.isMulticastAddress()) { + if (addr.isLoopbackAddress() || addr.isLinkLocalAddress() || addr.isMulticastAddress() || + !addr.isSiteLocalAddress()) { continue; } String hostName = addr.getHostName(); - LOG.info("Found " + hostName + " on " + ni); + LOG.info("Found " + hostName + " on " + ni + ", addr=" + addr); TEST_UTIL.getConfiguration().set(HRegionServer.MASTER_HOSTNAME_KEY, hostName); TEST_UTIL.getConfiguration().set(HRegionServer.RS_HOSTNAME_KEY, hostName);