September 2018
Intermediate to advanced
398 pages
9h 43m
English
The Await.result method is waiting for the result to be available. We have the possibility to give a timeout to the method so that it does not block forever.
The signature is as follows:
Await.result(awaitable: Awaitable[T], atMost: Duration)
The first parameter waits for Awaitable (Future extends Awaitable), and the second is Duration. Duration is the time to wait before throwing TimeoutException.
This is a pretty convenient method to get the value in our test.
Read now
Unlock full access