private void assertOperationStatus(CLIServiceClient serviceClient, OperationHandle opHandle, OperationState opState)
      throws InterruptedException, HiveSQLException {
    OperationState pStatus = OperationState.RUNNING;
    for (int i = 0; i < 10; i++) {
      Thread.sleep(100);
      pStatus = serviceClient.getOperationStatus(opHandle, false).getState();
      if (pStatus == opState) {
        break;
      }
    }
    assertEquals(opState, pStatus);
  }
Test overlapping async queries in one session.
Since TxnManager is shared in the session this can cause all kind of trouble.
@throws Exception ex
itests/hive-unit/src/test/java/org/apache/hive/jdbc/miniHS2/TestHiveServer2Acid.java