diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java index cb508f6beaf..10d8e1c6213 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java @@ -4003,8 +4003,11 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility { @Override public boolean evaluate() throws IOException { - final RegionStates regionStates = getMiniHBaseCluster().getMaster() - .getAssignmentManager().getRegionStates(); + HMaster master = getMiniHBaseCluster().getMaster(); + if (master == null) return false; + AssignmentManager am = master.getAssignmentManager(); + if (am == null) return false; + final RegionStates regionStates = am.getRegionStates(); return !regionStates.isRegionsInTransition(); } };