protected static void rollAllWALs() throws Exception {
    for (RegionServerThread t : UTIL.getMiniHBaseCluster().getLiveRegionServerThreads()) {
      t.getRegionServer().getWalRoller().requestRollAll();
    }
    UTIL.waitFor(30000, new ExplainingPredicate<Exception>() {

      @Override
      public boolean evaluate() throws Exception {
        return UTIL.getMiniHBaseCluster().getLiveRegionServerThreads().stream()
          .map(RegionServerThread::getRegionServer).allMatch(HRegionServer::walRollRequestFinished);
      }

      @Override
      public String explainFailure() throws Exception {
        return "Log roll has not finished yet";
      }
    });
  }
Base class for testing serial replication.
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/SerialReplicationTestBase.java