@Test
  public void testRestart() throws IOException, InterruptedException {
    byte[] row = Bytes.toBytes(0);
    try (Table table = UTIL.getConnection().getTable(NAME)) {
      table.put(new Put(row).addColumn(FAMILY, QUALIFIER, row));
    }
    // flush all in memory data
    UTIL.flush(TableName.META_TABLE_NAME);
    UTIL.flush(NAME);

    // stop master first, so when stopping region server, we will not schedule a SCP.
    UTIL.getMiniHBaseCluster().stopMaster(0).join();
    UTIL.getMiniHBaseCluster().stopRegionServer(0).join();

    // let's cleanup the WAL directory
    UTIL.getTestFileSystem().delete(new Path(CommonFSUtils.getWALRootDir(UTIL.getConfiguration()),
      HConstants.HREGION_LOGDIR_NAME), true);

    // restart the cluster
    UTIL.getMiniHBaseCluster().startMaster();
    UTIL.getMiniHBaseCluster().startRegionServer();
    UTIL.waitTableAvailable(NAME);

    // the start up should succeed and the data should be persist
    try (Table table = UTIL.getConnection().getTable(NAME)) {
      assertArrayEquals(row, table.get(new Get(row)).getValue(FAMILY, QUALIFIER));
    }
  }
Simulate the scenario described in HBASE-26245, where we clean the WAL directory and try to start
the cluster.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRestartWithEmptyWALDirectory.java