Adding explanation for Java DSL TestKit#awaitAssert return value (#24110) (#24737)

This commit is contained in:
Yoshimasa Tanabe 2018-03-16 19:41:18 +09:00 committed by Arnout Engelen
parent 5cbdcb83cc
commit a878e6c9fa
2 changed files with 3 additions and 1 deletions

View file

@ -190,7 +190,7 @@ an exception or the `max` duration is used up. If the timeout expires the
last exception is thrown. @scala[The interval defaults to 100 ms and the maximum defaults
to the time remaining in the innermost enclosing [within](#testkit-within)
block. The interval defaults to 100 ms and the maximum defaults to the time
remaining in the innermost enclosing [within](#testkit-within) block.]
remaining in the innermost enclosing [within](#testkit-within) block.] Return an arbitrary value that would be returned from awaitAssert if successful, if not interested in such value you can return null.
* @scala[`ignoreMsg(pf: PartialFunction[AnyRef, Boolean])`]@java[`public void ignoreMsg(Function<Object, Boolean> f)`]
@scala[`ignoreMsg`]@java[`public void ignoreMsg()`]

View file

@ -200,6 +200,8 @@ class TestKit(system: ActorSystem) {
*
* Note that the timeout is scaled using Duration.dilated,
* which uses the configuration entry "akka.test.timefactor".
*
* @return an arbitrary value that would be returned from awaitAssert if successful, if not interested in such value you can return null.
*/
def awaitAssert[A](max: Duration, interval: Duration, a: Supplier[A]): A = tp.awaitAssert(a.get, max, interval)