@Test void calculateTimeoutUsesScheduler() { VirtualTimeScheduler scheduler = VirtualTimeScheduler.create(); AbstractRetry<String, Integer> abstractRetry = new AbstractRetry<String, Integer>(2, Duration.ofSeconds(1), Backoff.ZERO_BACKOFF, Jitter.NO_JITTER, scheduler, null) { @Override public Publisher<Long> apply(Flux<Integer> integerFlux) { return null; } }; assertEquals(1000L, abstractRetry.calculateTimeout().toEpochMilli()); scheduler.advanceTimeBy(Duration.ofSeconds(3)); assertEquals(4000L, abstractRetry.calculateTimeout().toEpochMilli()); }
Instant calculateTimeout() { return timeout != null ? Instant.now(clock).plus(timeout) : Instant.MAX; }
AbstractRetry implements Function<Flux<S>, Publisher<Long>> { Instant calculateTimeout() { return timeout != null ? Instant.now(clock).plus(timeout) : Instant.MAX; } }
AbstractRetry implements Function<Flux<S>, Publisher<Long>> { Instant calculateTimeout() { return timeout != null ? Instant.now(clock).plus(timeout) : Instant.MAX; } AbstractRetry(long maxIterations,
			Duration timeout,
			Backoff backoff,
			Jitter jitter,
			@Nullable
			Scheduler backoffScheduler,
			T applicationContext); }
AbstractRetry implements Function<Flux<S>, Publisher<Long>> { Instant calculateTimeout() { return timeout != null ? Instant.now(clock).plus(timeout) : Instant.MAX; } AbstractRetry(long maxIterations,
			Duration timeout,
			Backoff backoff,
			Jitter jitter,
			@Nullable
			Scheduler backoffScheduler,
			T applicationContext);  }
AbstractRetry implements Function<Flux<S>, Publisher<Long>> { Instant calculateTimeout() { return timeout != null ? Instant.now(clock).plus(timeout) : Instant.MAX; } AbstractRetry(long maxIterations,
			Duration timeout,
			Backoff backoff,
			Jitter jitter,
			@Nullable
			Scheduler backoffScheduler,
			T applicationContext);   }