@Test public void failsFutureIfSupplierThrows() { RuntimeException exception = new RuntimeException(); replaceableFunction = () -> { throw exception; }; ListenableFuture<Integer> hopefullyFailedFuture = retrier.execute(function); scheduler.runUntilIdle(); assertThatThrownBy(() -> Futures.getDone(hopefullyFailedFuture)).hasCause(exception); }
public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) { return execute(supplier, maxAttempts); }
AsyncRetrier { public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) { return execute(supplier, maxAttempts); } }
AsyncRetrier { public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) { return execute(supplier, maxAttempts); } AsyncRetrier(
            int maxAttempts,
            Duration delayBetweenAttempts,
            ListeningScheduledExecutorService schedulingExecutor,
            ListeningExecutorService executionExecutor,
            Predicate<T> predicate); }
AsyncRetrier { public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) { return execute(supplier, maxAttempts); } AsyncRetrier(
            int maxAttempts,
            Duration delayBetweenAttempts,
            ListeningScheduledExecutorService schedulingExecutor,
            ListeningExecutorService executionExecutor,
            Predicate<T> predicate); ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier); }
AsyncRetrier { public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) { return execute(supplier, maxAttempts); } AsyncRetrier(
            int maxAttempts,
            Duration delayBetweenAttempts,
            ListeningScheduledExecutorService schedulingExecutor,
            ListeningExecutorService executionExecutor,
            Predicate<T> predicate); ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier);  }