DefaultAwaitTimeout

play.api.test.DefaultAwaitTimeout

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Helpers

Members list

Type members

Classlikes

case class NegativeTimeout(t: Timeout)

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.

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.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Implicits

Implicits

The default await timeout. Override this to change it.

The default await timeout. Override this to change it.

Attributes