EventuallyResults

This trait adds the possibility to retry a given value, convertible to a result, until it succeeds.

This was adapted from a contribution by @robey (http://robey.lag.net)

Companion:
object
class Object
trait Matchable
class Any
object EventuallyResults.type

Value members

Concrete methods

def eventually[T](retries: Int, sleep: Int => Duration)(result: => T)(using evidence$1: AsResult[T]): T
Value parameters:
sleep

the function applied on the retry number (first is 1)

Returns:

a matcher that will retry the nested matcher a given number of times

eventually(retries = 2, sleep = _ * 100.milliseconds) {
 aResult
}
def eventually[T](retries: Int, sleep: Duration)(result: => T)(using evidence$2: AsResult[T]): T
Returns:

a matcher that will retry the nested matcher a given number of times

def eventually[T](result: => T)(using evidence$3: AsResult[T]): T
Returns:

a result that is retried at least 40 times until it's ok