HBASE-24635 Addendum make test more robust

This commit is contained in:
Duo Zhang 2020-06-27 11:29:43 +08:00
parent 16a25b74db
commit af49b87367
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ public class TestShutdownOfMetaReplicaHolder extends MetaWithReplicasTestBase {
LOG.debug("Waiting for the replica {} to come up", hrl.getRegion());
TEST_UTIL.waitFor(30000, () -> {
HRegionLocation loc = locator.getRegionLocations(HConstants.EMPTY_START_ROW, true).get(1);
return !loc.getServerName().equals(oldServer);
return loc != null && !loc.getServerName().equals(oldServer);
});
LOG.debug("Replica {} is online on {}, old server is {}", hrl.getRegion(),
locator.getRegionLocations(HConstants.EMPTY_START_ROW, true).get(1).getServerName(),