Package 

Interface FlakySafetyProvider


  • 
    public interface FlakySafetyProvider
    
                        

    The interface to provide the flaky safety functionality.

    • Method Summary

      Modifier and Type Method Description
      abstract <T extends Any> T flakySafely(Function0<T> action) Invokes the given action flaky safely.
      abstract <T extends Any> T flakySafely(Long timeoutMs, Long intervalMs, Set<Class<Out Throwable>> allowedExceptions, String failureMessage, Function0<T> action) Invokes the given action flaky safely.
      • Methods inherited from class com.kaspersky.kaspresso.flakysafety.FlakySafetyProvider

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • flakySafely

         abstract <T extends Any> T flakySafely(Function0<T> action)

        Invokes the given action flaky safely.

        Parameters:
        action - the action to invoke.
      • flakySafely

         abstract <T extends Any> T flakySafely(Long timeoutMs, Long intervalMs, Set<Class<Out Throwable>> allowedExceptions, String failureMessage, Function0<T> action)

        Invokes the given action flaky safely.

        Parameters:
        timeoutMs - the timeout during which attempts will be made.
        intervalMs - the interval at which attempts will be made.
        allowedExceptions - the set of exceptions that allow to continue an attempt of execution.
        failureMessage - the message to log on failure.
        action - the action to invoke.