private AsyncInvocation<V> timeoutIfAlive(final long timeout) throws TimeoutException {
    if (thread.isAlive()) {
      TimeoutException timeoutException = new TimeoutException(
          "Timed out waiting " + timeout + " milliseconds for AsyncInvocation to complete.");
      throw asyncTimeoutHandler.apply(timeoutException);
    }
    return this;
  }
Throws {@code AssertionError} wrapping a {@code TimeoutException} if this
{@code AsyncInvocation} fails to complete within {@link GeodeAwaitility#getTimeout()}.

@return this {@code AsyncInvocation}

@throws TimeoutException if this {@code AsyncInvocation} fails to complete within
        {@link GeodeAwaitility#getTimeout()}.
geode-dunit/src/main/java/org/apache/geode/test/dunit/AsyncInvocation.java