HBASE-24635 Addendum make test more robust
This commit is contained in:
parent
16a25b74db
commit
af49b87367
|
@ -57,7 +57,7 @@ public class TestShutdownOfMetaReplicaHolder extends MetaWithReplicasTestBase {
|
||||||
LOG.debug("Waiting for the replica {} to come up", hrl.getRegion());
|
LOG.debug("Waiting for the replica {} to come up", hrl.getRegion());
|
||||||
TEST_UTIL.waitFor(30000, () -> {
|
TEST_UTIL.waitFor(30000, () -> {
|
||||||
HRegionLocation loc = locator.getRegionLocations(HConstants.EMPTY_START_ROW, true).get(1);
|
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(),
|
LOG.debug("Replica {} is online on {}, old server is {}", hrl.getRegion(),
|
||||||
locator.getRegionLocations(HConstants.EMPTY_START_ROW, true).get(1).getServerName(),
|
locator.getRegionLocations(HConstants.EMPTY_START_ROW, true).get(1).getServerName(),
|
||||||
|
|
Loading…
Reference in New Issue