use of org.apache.hadoop.hbase.PleaseHoldException in project hbase by apache.
the class TestMaster method testMoveRegionWhenNotInitialized.
@Test
public void testMoveRegionWhenNotInitialized() {
SingleProcessHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
HMaster m = cluster.getMaster();
try {
// fake it, set back later
m.setInitialized(false);
RegionInfo meta = RegionInfoBuilder.FIRST_META_REGIONINFO;
m.move(meta.getEncodedNameAsBytes(), null);
fail("Region should not be moved since master is not initialized");
} catch (IOException ioe) {
assertTrue(ioe instanceof PleaseHoldException);
} finally {
m.setInitialized(true);
}
}
Aggregations