@Override
    protected void checkAndSendGuaranteedStateUpdate(TaskInfo ti) {
      // A test-specific delay just before the check happens.
      synchronized (checkDelay) {
        boolean isFirst = true;
        while (doDelayCheckAndSend) {
          if (isFirst) {
            synchronized (messageLock) {
              ++checkAndSendCount;
              messageLock.notifyAll();
            }
            isFirst = false;
          }
          try {
            checkDelay.wait(100);
          } catch (InterruptedException e) {
            throw new RuntimeException(e);
          }
        }
      }
      super.checkAndSendGuaranteedStateUpdate(ti);
    }
@param timeoutMs
@return false if the time elapsed
@throws InterruptedException
llap-tez/src/test/org/apache/hadoop/hive/llap/tezplugins/TestLlapTaskSchedulerService.java