ask-2.0
This commit is contained in:
parent
774584642e
commit
a44da38e2b
13 changed files with 122 additions and 120 deletions
|
|
@ -53,7 +53,6 @@ import akka.actor.Status.Failure;
|
|||
import akka.actor.ActorSystem;
|
||||
import akka.actor.UntypedActor;
|
||||
import akka.actor.ActorRef;
|
||||
import akka.docs.actor.MyUntypedActor;
|
||||
import akka.actor.Props;
|
||||
import akka.dispatch.Futures;
|
||||
|
||||
|
|
@ -79,7 +78,7 @@ public class FutureDocTestBase {
|
|||
String msg = "hello";
|
||||
//#ask-blocking
|
||||
Timeout timeout = system.settings().ActorTimeout();
|
||||
Future<Object> future = actor.ask(msg, timeout);
|
||||
Future<Object> future = Futures.ask(actor, msg, timeout);
|
||||
String result = (String) Await.result(future, timeout.duration());
|
||||
//#ask-blocking
|
||||
assertEquals("HELLO", result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue