@Test
  public void testWALArchiving() throws IOException {
    LOG.debug(currentTest.getMethodName());

    Configuration localConf = new Configuration(conf);
    localConf.set(WALFactory.WAL_PROVIDER, FSHLogProvider.class.getName());
    WALFactory wals = new WALFactory(localConf, currentTest.getMethodName());
    try {
      testWALArchiving(wals);
    } finally {
      wals.close();
    }
  }
Tests wal archiving by adding data, doing flushing/rolling and checking we archive old logs and
also don't archive "live logs" (that is, a log with un-flushed entries).
<p>
This is what it does: It creates two regions, and does a series of inserts along with log
rolling. Whenever a WAL is rolled, HLogBase checks previous wals for archiving. A wal is
eligible for archiving if for all the regions which have entries in that wal file, have flushed
- past their maximum sequence id in that wal file.
<p>
hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestFSHLogProvider.java