diff --git a/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java b/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java index b369c768c27..bdec3ee7a86 100644 --- a/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java +++ b/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java @@ -655,13 +655,13 @@ public class TestMasterObserver { // Try to force a move Collection servers = master.getClusterStatus().getServers(); String destName = null; - String firstRegionHostnamePortStr = firstGoodPair.getValue().toString(); - LOG.info("firstRegionHostnamePortStr=" + firstRegionHostnamePortStr); + String serverNameForFirstRegion = firstGoodPair.getValue().toString(); + LOG.info("serverNameForFirstRegion=" + serverNameForFirstRegion); boolean found = false; // Find server that is NOT carrying the first region for (ServerName info : servers) { LOG.info("ServerName=" + info); - if (!firstRegionHostnamePortStr.equals(info.getHostAndPort())) { + if (!serverNameForFirstRegion.equals(info.getServerName())) { destName = info.toString(); found = true; break;