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 1c42c06b115..63987d2047f 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 @@ -62,7 +62,9 @@ public class TestRegionServerHostname { } catch (IOException ioe) { Throwable t1 = ioe.getCause(); Throwable t2 = t1.getCause(); - assertTrue(t2.getMessage().contains("Failed resolve of " + invalidHostname)); + assertTrue(t1.getMessage() + " - " + t2.getMessage(), + t2.getMessage().contains("Failed resolve of " + invalidHostname) || + t2.getMessage().contains("Problem binding to " + invalidHostname)); return; } finally { TEST_UTIL.shutdownMiniCluster();