Clarify awaitAssert scaladoc
Make it more obvious that awaitAssert will periodically evaluate the assertion (including performing any side effects in it) until it succeeds (or the timeout is reached)
This commit is contained in:
parent
62ba6fe266
commit
15b166765b
2 changed files with 4 additions and 6 deletions
|
|
@ -283,9 +283,8 @@ trait TestKitBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Await until the given assert does not throw an exception or the timeout
|
||||
* expires, whichever comes first. If the timeout expires the last exception
|
||||
* is thrown.
|
||||
* Evaluate the given assert every `interval` until it does not throw an exception.
|
||||
* If the `max` timeout expires the last exception is thrown.
|
||||
*
|
||||
* If no timeout is given, take it from the innermost enclosing `within`
|
||||
* block.
|
||||
|
|
|
|||
|
|
@ -195,9 +195,8 @@ class TestKit(system: ActorSystem) {
|
|||
def awaitAssert(max: Duration, a: Supplier[Any]): Unit = tp.awaitAssert(a.get, max)
|
||||
|
||||
/**
|
||||
* Await until the given assert does not throw an exception or the timeout
|
||||
* expires, whichever comes first. If the timeout expires the last exception
|
||||
* is thrown.
|
||||
* Evaluate the given assert every `interval` until it does not throw an exception.
|
||||
* If the `max` timeout expires the last exception is thrown.
|
||||
*
|
||||
* Note that the timeout is scaled using Duration.dilated,
|
||||
* which uses the configuration entry "akka.test.timefactor".
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue