@Test
  public void testCorruptedRegionManifest() throws IOException {
    SnapshotTestingUtils.SnapshotMock snapshotMock =
      new SnapshotTestingUtils.SnapshotMock(conf, fs, rootDir);
    SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder =
      snapshotMock.createSnapshotV2(SNAPSHOT_NAME_STR, TABLE_NAME_STR);
    builder.addRegionV2();
    builder.corruptOneRegionManifest();

    long period = Long.MAX_VALUE;
    SnapshotFileCache cache = new SnapshotFileCache(conf, period, 10000000,
      "test-snapshot-file-cache-refresh", new SnapshotFiles());
    try {
      cache.getSnapshotsInProgress();
    } finally {
      fs.delete(SnapshotDescriptionUtils.getWorkingSnapshotDir(rootDir, conf), true);
    }
  }
If there is a corrupted region manifest, it should throw out CorruptedSnapshotException,
instead of an IOException
hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestSnapshotHFileCleaner.java