diff --git a/akka-docs/src/main/paradox/testing.md b/akka-docs/src/main/paradox/testing.md index 938a577870..fc4cacd547 100644 --- a/akka-docs/src/main/paradox/testing.md +++ b/akka-docs/src/main/paradox/testing.md @@ -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 f)`] @scala[`ignoreMsg`]@java[`public void ignoreMsg()`] diff --git a/akka-testkit/src/main/scala/akka/testkit/javadsl/TestKit.scala b/akka-testkit/src/main/scala/akka/testkit/javadsl/TestKit.scala index 8dbc2e8839..e66cc813ce 100644 --- a/akka-testkit/src/main/scala/akka/testkit/javadsl/TestKit.scala +++ b/akka-testkit/src/main/scala/akka/testkit/javadsl/TestKit.scala @@ -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)