abstract class Within extends AnyRef
Execute code block while bounding its execution time between min
and max
. Within
blocks may be nested. All methods in this trait which take maximum
wait times are available in a version which implicitly uses the remaining time governed by the
innermost enclosing Within
block.
Note that the timeout is scaled using dilated
, which uses the configuration
entry "akka.test.timefactor", while the min Duration is not.
// the run() method needs to finish within 3 seconds
new Within(duration("3 seconds")) {
protected void run() {
// ...
}
}
- Source
- JavaTestKit.java
- Alphabetic
- By Inheritance
- Within
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Within(min: FiniteDuration, max: FiniteDuration)
- new Within(max: FiniteDuration)