Package

core3.test

utils

Permalink

package utils

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. utils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class ExtendedAwaitable[T] extends AnyRef

    Permalink

Value Members

  1. implicit def futureToResult[T](f: Future[T]): ExtendedAwaitable[T]

    Permalink
  2. def waitUntil(what: String, waitTimeMs: Long, waitAttempts: Int)(f: ⇒ Boolean): Unit

    Permalink

    Checks the result of the function 'f' and puts the current thread to sleep if it evaluates to false until, either the function returns true or the maximum number of attempts have been performed.

    Checks the result of the function 'f' and puts the current thread to sleep if it evaluates to false until, either the function returns true or the maximum number of attempts have been performed.

    Note: The supplied function can be called more times that the set number of attempts.

    what

    simple description of what is being waited for

    waitTimeMs

    the amount of time to wait for each attempts (in ms)

    waitAttempts

    the maximum number of attempts to make while waiting

    f

    the function to be execution as part of each attempts

    Exceptions thrown

    RuntimeException if the wait fails

  3. def waitUntilFuture(what: String, waitTimeMs: Long, waitAttempts: Int)(f: ⇒ Future[Boolean])(implicit ec: ExecutionContext): Future[Unit]

    Permalink

    Maps through the future created by the function 'f', checks the result and either creates a new future by executing the supplied function or, if the maximum number of attempts have been performed, it fails.

    Maps through the future created by the function 'f', checks the result and either creates a new future by executing the supplied function or, if the maximum number of attempts have been performed, it fails.

    Note: The supplied function will be called multiple times, creating multiple futures.

    what

    simple description of what is being waited for

    waitTimeMs

    the amount of time to wait for each attempts (in ms)

    waitAttempts

    the maximum number of attempts to make while waiting

    f

    the function to be execution as part of each attempts

    ec

    implicit execution context

    returns

    a future to wait on for the result of the operation

Inherited from AnyRef

Inherited from Any

Ungrouped