Object/Trait

org.scalatest.enablers

Timed

Related Docs: trait Timed | package enablers

Permalink

object Timed

Companion object for Timed typeclass that offers three implicit providers: one for FutureOutcome, one for Future of any type, and one for any other type.

The details are in the documentation for the implicit providers themselves (methods timed, timedFutureOf, and timedFutureOutcome), but in short if a time limit is exceeded:

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

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. implicit def timed[T]: Timed[T]

    Permalink

    Implicit method that provides Timed implementation for any T.

    Implicit method that provides Timed implementation for any T.

    If the function completes before the timeout expires:

    • If the function returns normally, this method will return normally.
    • If the function completes abruptly with an exception, this method will complete abruptly with that same exception.

    If the function completes after the timeout expires:

    • If the function returns normally, this method will complete abruptly with a StackDepthException created from exceptionFun.
    • If the function completes abruptly with an exception, this method will complete abruptly with a StackDepthException created from exceptionFun that includes the exception thrown by the function as its cause.

    This implementation will start a timer that when the time limit is exceeded while the passed in function f is still running, it will attempt to call the passed in Signaler to signal/interrupt the running function f.

  17. implicit def timedFutureOf[T](implicit executionContext: ExecutionContext): Timed[Future[T]]

    Permalink

    Implicit method that provides Timed implementation for any Future[T].

    Implicit method that provides Timed implementation for any Future[T].

    If the asynchronous function completes before the timeout expires:

    • If the function returns normally, the Future will be completed with the return value of the function.
    • If the function completes abruptly with an exception, this method will complete the Future with that same exception.

    If the asynchronous function completes after the timeout expires:

    • If the function returns normally, this method will complete the Future with a StackDepthException created from exceptionFun.
    • If the function completes abruptly with an exception, this method will complete the Future with a StackDepthException created from exceptionFun that includes the exception thrown by the function as its cause.

    This implementation will start a timer that when the time limit is exceeded while the passed in asynchronous function f is still running, it will attempt to call the passed in Signaler to signal/interrupt the running function f.

  18. implicit def timedFutureOutcome(implicit executionContext: ExecutionContext): Timed[FutureOutcome]

    Permalink

    Implicit method that provides Timed implementation for FutureOutcome.

    Implicit method that provides Timed implementation for FutureOutcome.

    If the asynchronous function completes before the timeout expires:

    • If the function returns normally, the FutureOutcome will be completed with the Outcome returned from the function.
    • If the function completes abruptly with an TestPendingException, this method will complete the FutureOutcome with Pending.
    • If the function completes abruptly with an TestCanceledException, this method will complete the FutureOutcome with Canceled that contains the thrown exception.
    • If the function completes abruptly with a run-aborting exception, this method will complete the FutureOutcome with Failed that contains the thrown exception.
    • If the function completes abruptly with a non-run-aborting exception, this method will fail the FutureOutcome with ExecutionException that contains the thrown exception.

    If the asynchronous function completes after the timeout expires:

    • If the function returns normally, this method will complete the FutureOutcome with a Outcome that's mapped from the exception thrown from exceptionFun.
    • If the function completes abruptly with an exception, this method will complete the FutureOutcome with Outcome that's mapped from the exception thrown from exceptionFun that includes the exception thrown by the function as its cause.

    This implementation will start a timer that when the time limit is exceeded while the passed in asynchronous function f is still running, it will attempt to call the passed in Signaler to signal/interrupt the running function f.

  19. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped