@Test
  public void testBatchSizeDoesNotOverflow() {
    ReopenTableRegionsProcedure proc =
      new ReopenTableRegionsProcedure(TABLE_NAME, BACKOFF_MILLIS_PER_RS, Integer.MAX_VALUE);
    int currentBatchSize = 1;
    while (currentBatchSize < Integer.MAX_VALUE) {
      currentBatchSize = proc.progressBatchSize();
      assertTrue(currentBatchSize > 0);
    }
  }
Confirm that we will batch region reopens when reopening all table regions. This can avoid the
pain associated with reopening too many regions at once.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestReopenTableRegionsProcedureBatching.java