-
- All Implemented Interfaces:
-
com.kaspersky.kaspresso.flakysafety.FlakySafetyProvider
public final class FlakySafetyProviderSimpleImpl implements FlakySafetyProvider
The implementation of the FlakySafetyProvider interface. By default, this implementation is using to struggle with flaky UI libs inside a View
-
-
Constructor Summary
Constructors Constructor Description FlakySafetyProviderSimpleImpl(FlakySafetyParams params, UiTestLogger logger)
-
Method Summary
Modifier and Type Method Description <T extends Any> TflakySafely(Function0<T> action)Invokes the given action flaky safely. <T extends Any> TflakySafely(Long timeoutMs, Long intervalMs, Set<Class<Out Throwable>> allowedExceptions, String failureMessage, Function0<T> action)Invokes the given action flaky safely. -
-
Constructor Detail
-
FlakySafetyProviderSimpleImpl
FlakySafetyProviderSimpleImpl(FlakySafetyParams params, UiTestLogger logger)
-
-
Method Detail
-
flakySafely
<T extends Any> T flakySafely(Function0<T> action)
Invokes the given action flaky safely.
- Parameters:
action- the action to invoke.
-
flakySafely
<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, if caught, attempt will continue.failureMessage- the message to log on failure.action- the action to invoke.
-
-
-
-