public static <E extends Exception> long waitFor(Configuration conf, long timeout,
    Predicate<E> predicate) {
    return waitFor(conf, timeout, 100, true, predicate);
  }
Waits up to the duration equal to the specified timeout multiplied by the
{@link #getWaitForRatio(Configuration)} for the given {@link Predicate} to become
<code>true</code>, failing the test if the timeout is reached and the Predicate is still
<code>false</code>.
<p/>
@param conf      the configuration
@param timeout   the timeout in milliseconds to wait for the predicate.
@param predicate the predicate to evaluate.
@return the effective wait, in milli-seconds until the predicate becomes <code>true</code> or
        wait is interrupted otherwise <code>-1</code> when times out
hbase-common/src/test/java/org/apache/hadoop/hbase/Waiter.java