-
public interface ContinuouslyProviderThe interface to provide the flaky safety functionality.
-
-
Method Summary
Modifier and Type Method Description abstract <T extends Any> Tcontinuously(Function0<T> action)Invokes the given action during set timeout. abstract <T extends Any> Tcontinuously(Long timeoutMs, Long intervalMs, String failureMessage, Function0<T> action)Invokes the given action during set timeout. -
-
Method Detail
-
continuously
abstract <T extends Any> T continuously(Function0<T> action)
Invokes the given action during set timeout.
It can be helpful for checking of negative scenarios.
In opposite to FlakySafetyProvider.flakySafely it does not skip last attempt after first success and throws inside exception outside as soon as it was thrown
- Parameters:
action- the action to invoke.
-
continuously
abstract <T extends Any> T continuously(Long timeoutMs, Long intervalMs, String failureMessage, Function0<T> action)
Invokes the given action during set timeout.
It can be helpful for checking of negative scenarios.
In opposite to FlakySafetyProvider.flakySafely it does not skips last attempt after first success and throws inside exception outside as soon as it was thrown
- Parameters:
timeoutMs- the timeout during which attempts will be made.intervalMs- the interval at which attempts will be made.failureMessage- the message to log on failure.action- the action to invoke.
-
-
-
-