Packages

t

play.api.test

DefaultAwaitTimeout

trait DefaultAwaitTimeout extends AnyRef

Source
Helpers.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DefaultAwaitTimeout
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class NegativeTimeout(t: Timeout) extends Product with Serializable

    How long we should wait for something that we expect *not* to happen, e.g.

    How long we should wait for something that we expect *not* to happen, e.g. waiting to make sure that a channel is *not* closed by some concurrent process.

    NegativeTimeout is a separate type to a normal Timeout because we'll want to set it to a lower value. This is because in normal usage we'll need to wait for the full length of time to show that nothing has happened in that time. If the value is too high then we'll spend a lot of time waiting during normal usage. If it is too low, however, we may miss events that occur after the timeout has finished. This is a necessary trade-off.

    Where possible, tests should avoid using a NegativeTimeout. Tests will often know exactly when an event should occur. In this case they can perform a check for the event immediately rather than using using NegativeTimeout.

Value Members

  1. implicit def defaultAwaitTimeout: Timeout

    The default await timeout.

    The default await timeout. Override this to change it.

  2. implicit val defaultNegativeTimeout: NegativeTimeout