@Override
      public void run() {
        while (!incrementDone.get()) {
          try {
            region.flush(true);
          } catch (Exception e) {
            e.printStackTrace();
          }
        }
      }
Test case to check increment function with memstore flushing
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java