Skip to content

Commit

Permalink
add more logging on the retry behaviour for the Waiter
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-james committed Jun 26, 2024
1 parent 0b27684 commit 6b7ecef
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ public <T> T waitFor(final Assertion<T> assertion)
}
catch (final Throwable throwable)
{
LockSupport.parkNanos(TimeUnit.SECONDS.toNanos(calculateExponentialBackoffDelay(i + 1)));
final long exponentialBackoff = calculateExponentialBackoffDelay(i + 1);
LOGGER.info("Retrying assertion after {} seconds, retry atempt {}.", exponentialBackoff, i);
LockSupport.parkNanos(TimeUnit.SECONDS.toNanos(exponentialBackoff));
}
}
throw new AssertionError("Waiting for condition that never happened.");
Expand Down

0 comments on commit 6b7ecef

Please sign in to comment.