Package 

Interface ContinuouslyProvider

    • Method Summary

      Modifier and Type Method Description
      abstract <T extends Any> T continuously(Function0<T> action) Invokes the given action during set timeout.
      abstract <T extends Any> T continuously(Long timeoutMs, Long intervalMs, String failureMessage, Function0<T> action) Invokes the given action during set timeout.
      • Methods inherited from class com.kaspersky.kaspresso.flakysafety.ContinuouslyProvider

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.