@Test void testRetryFirstTimeTrue() { RepeatedAttemptsPredicate rawPredicate = new RepeatedAttemptsPredicate(1); Predicate<String> predicate = retry(rawPredicate, 4, 1, SECONDS); stopwatch.start(); assertTrue(predicate.apply("")); long duration = stopwatch.elapsed(MILLISECONDS); assertOrdered(0, duration, 0 + SLOW_BUILD_SERVER_GRACE); assertCallTimes(rawPredicate.callTimes, 0); }
public static <T> Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, long maxPeriod, TimeUnit unit) { return new RetryablePredicate<T>(findOrBreak, timeout, period, maxPeriod, unit); }
Predicates2 { public static <T> Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, long maxPeriod, TimeUnit unit) { return new RetryablePredicate<T>(findOrBreak, timeout, period, maxPeriod, unit); } }
Predicates2 { public static <T> Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, long maxPeriod, TimeUnit unit) { return new RetryablePredicate<T>(findOrBreak, timeout, period, maxPeriod, unit); }  }
Predicates2 { public static <T> Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, long maxPeriod, TimeUnit unit) { return new RetryablePredicate<T>(findOrBreak, timeout, period, maxPeriod, unit); }  static Predicate<String> startsWith(final String prefix); static Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, long maxPeriod,
         TimeUnit unit); static Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, TimeUnit unit); static Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, long maxPeriod); static Predicate<T> retry(Predicate<T> findOrBreak, long timeout); }
Predicates2 { public static <T> Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, long maxPeriod, TimeUnit unit) { return new RetryablePredicate<T>(findOrBreak, timeout, period, maxPeriod, unit); }  static Predicate<String> startsWith(final String prefix); static Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, long maxPeriod,
         TimeUnit unit); static Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, TimeUnit unit); static Predicate<T> retry(Predicate<T> findOrBreak, long timeout, long period, long maxPeriod); static Predicate<T> retry(Predicate<T> findOrBreak, long timeout); static final long DEFAULT_PERIOD; static final long DEFAULT_MAX_PERIOD; }