@Test public void maxRetriesAreHonored() { AutoRetryStrategy strategy = newStrategy(builder -> builder.maxRetries(1)); Completable retry = strategy.apply(2, RETRYABLE_EXCEPTION); toSource(retry).subscribe(retrySubscriber); verifyRetryResultError(RETRYABLE_EXCEPTION); }
@Override public AutoRetryStrategy newStrategy(final Publisher<Object> lbEventStream, final Completable sdStatus) { if (!waitForLb && !retryAllRetryableExceptions) { return (count, cause) -> failed(cause); } return new DefaultAutoRetryStrategy(maxRetryCount, waitForLb, retryAllRetryableExceptions, lbEventStream, ignoreSdErrors ? null : sdStatus); }
DefaultAutoRetryStrategyProvider implements AutoRetryStrategyProvider { @Override public AutoRetryStrategy newStrategy(final Publisher<Object> lbEventStream, final Completable sdStatus) { if (!waitForLb && !retryAllRetryableExceptions) { return (count, cause) -> failed(cause); } return new DefaultAutoRetryStrategy(maxRetryCount, waitForLb, retryAllRetryableExceptions, lbEventStream, ignoreSdErrors ? null : sdStatus); } }
DefaultAutoRetryStrategyProvider implements AutoRetryStrategyProvider { @Override public AutoRetryStrategy newStrategy(final Publisher<Object> lbEventStream, final Completable sdStatus) { if (!waitForLb && !retryAllRetryableExceptions) { return (count, cause) -> failed(cause); } return new DefaultAutoRetryStrategy(maxRetryCount, waitForLb, retryAllRetryableExceptions, lbEventStream, ignoreSdErrors ? null : sdStatus); } private  DefaultAutoRetryStrategyProvider(final int maxRetryCount, final boolean waitForLb,
                                             final boolean ignoreSdErrors,
                                             final boolean retryAllRetryableExceptions); }
DefaultAutoRetryStrategyProvider implements AutoRetryStrategyProvider { @Override public AutoRetryStrategy newStrategy(final Publisher<Object> lbEventStream, final Completable sdStatus) { if (!waitForLb && !retryAllRetryableExceptions) { return (count, cause) -> failed(cause); } return new DefaultAutoRetryStrategy(maxRetryCount, waitForLb, retryAllRetryableExceptions, lbEventStream, ignoreSdErrors ? null : sdStatus); } private  DefaultAutoRetryStrategyProvider(final int maxRetryCount, final boolean waitForLb,
                                             final boolean ignoreSdErrors,
                                             final boolean retryAllRetryableExceptions); @Override AutoRetryStrategy newStrategy(final Publisher<Object> lbEventStream, final Completable sdStatus); }
DefaultAutoRetryStrategyProvider implements AutoRetryStrategyProvider { @Override public AutoRetryStrategy newStrategy(final Publisher<Object> lbEventStream, final Completable sdStatus) { if (!waitForLb && !retryAllRetryableExceptions) { return (count, cause) -> failed(cause); } return new DefaultAutoRetryStrategy(maxRetryCount, waitForLb, retryAllRetryableExceptions, lbEventStream, ignoreSdErrors ? null : sdStatus); } private  DefaultAutoRetryStrategyProvider(final int maxRetryCount, final boolean waitForLb,
                                             final boolean ignoreSdErrors,
                                             final boolean retryAllRetryableExceptions); @Override AutoRetryStrategy newStrategy(final Publisher<Object> lbEventStream, final Completable sdStatus);  }