private void submitRequestsToRegion(Table table, RegionInfo regionInfo) throws IOException {
    // We will block closes of the regions with a CP, so no need to worry about the region getting
    // reassigned. Just use the same rowkey always.
    byte[] rowKey = getRowKeyWithin(regionInfo);

    int i = 0;
    while (true) {
      try {
        i++;
        table.put(new Put(rowKey).addColumn(CF, Bytes.toBytes(i), Bytes.toBytes(i)));
      } catch (IOException e) {
        // only catch RegionServerAbortedException once. After that, the next exception thrown
        // is our test case
        if (
          !shouldThrowTooBig && e instanceof RetriesExhaustedException
            && e.getCause() instanceof RegionServerAbortedException
        ) {
          shouldThrowTooBig = true;
        } else {
          throw e;
        }
      }

      // small sleep to relieve pressure
      Threads.sleep(10);
    }
  }
Tests that the logic in ServerRpcConnection works such that if the server is aborted, it short
circuits any other logic. This means we no longer even attempt to enqueue the request onto the
call queue. We verify this by using a special call queue which we can trigger to always return
CallQueueTooBigException. If the logic works, despite forcing those exceptions, we should not
see them.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerRejectDuringAbort.java