HBASE-12167 addendum; fix TestMasterObserver

This commit is contained in:
Jimmy Xiang 2014-10-03 15:02:41 -07:00
parent 6b95b4a8a4
commit 51ef418534
1 changed files with 3 additions and 1 deletions

View File

@ -1377,11 +1377,13 @@ public class TestMasterObserver {
String destName = null;
String serverNameForFirstRegion = firstGoodPair.getValue().toString();
LOG.info("serverNameForFirstRegion=" + serverNameForFirstRegion);
ServerName masterServerName = master.getServerName();
boolean found = false;
// Find server that is NOT carrying the first region
for (ServerName info : servers) {
LOG.info("ServerName=" + info);
if (!serverNameForFirstRegion.equals(info.getServerName())) {
if (!serverNameForFirstRegion.equals(info.getServerName())
&& !masterServerName.equals(info)) {
destName = info.toString();
found = true;
break;