=tes Update documentation for testkit fishForSpecificMessage #23608 (#23609)

This commit is contained in:
Kamil Kafara 2017-09-11 18:30:14 +02:00 committed by Konrad `ktoso` Malawski
parent 170a7504eb
commit da1e960c08

View file

@ -442,7 +442,11 @@ trait TestKitBase {
}
/**
* Same as `fishForMessage`, but gets a different partial function and returns properly typed message.
* Waits for specific message that partial function matches while ignoring all other messages coming in the meantime.
* Use it to ignore any number of messages while waiting for a specific one.
*
* @return result of applying partial function to the last received message,
* i.e. the first one for which the partial function is defined
*/
def fishForSpecificMessage[T](max: Duration = Duration.Undefined, hint: String = "")(f: PartialFunction[Any, T]): T = {
val _max = remainingOrDilated(max)