Create timeouts from java without using durations
This commit is contained in:
parent
4661145881
commit
9b58ecece7
4 changed files with 8 additions and 11 deletions
|
|
@ -23,7 +23,6 @@ import akka.japi.Function;
|
|||
//#import-function
|
||||
|
||||
//#import-timeout
|
||||
import akka.util.Duration;
|
||||
import akka.util.Timeout;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
//#import-timeout
|
||||
|
|
@ -86,7 +85,7 @@ public class AgentDocTest {
|
|||
//#send-off
|
||||
|
||||
//#read-await
|
||||
Integer result = agent.await(new Timeout(Duration.create(5, SECONDS)));
|
||||
Integer result = agent.await(new Timeout(5, SECONDS));
|
||||
//#read-await
|
||||
|
||||
assertEquals(result, new Integer(14));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue