Renaming Block to Await, renaming sync to result, renaming on to ready, Await.ready and Await.result looks and reads well
This commit is contained in:
parent
d8fe6a5509
commit
b32cbbc764
66 changed files with 404 additions and 409 deletions
|
|
@ -8,7 +8,7 @@ import collection.mutable.LinkedList
|
|||
import akka.routing.Routing.Broadcast
|
||||
import java.util.concurrent.{ CountDownLatch, TimeUnit }
|
||||
import akka.testkit._
|
||||
import akka.dispatch.Block
|
||||
import akka.dispatch.Await
|
||||
|
||||
object RoutingSpec {
|
||||
|
||||
|
|
@ -271,7 +271,7 @@ class RoutingSpec extends AkkaSpec with DefaultTimeout {
|
|||
|
||||
shutdownLatch.await
|
||||
|
||||
Block.sync(actor ? Broadcast(0), timeout.duration).asInstanceOf[Int] must be(1)
|
||||
Await.result(actor ? Broadcast(0), timeout.duration).asInstanceOf[Int] must be(1)
|
||||
}
|
||||
|
||||
"throw an exception, if all the connections have stopped" in {
|
||||
|
|
@ -298,7 +298,7 @@ class RoutingSpec extends AkkaSpec with DefaultTimeout {
|
|||
|
||||
val actor = new RoutedActorRef(system, props, impl.guardian, "foo")
|
||||
|
||||
Block.sync(actor ? Broadcast("Hi!"), timeout.duration).asInstanceOf[Int] must be(0)
|
||||
Await.result(actor ? Broadcast("Hi!"), timeout.duration).asInstanceOf[Int] must be(0)
|
||||
}
|
||||
|
||||
"return the first response from connections, when some of them failed to reply" in {
|
||||
|
|
@ -306,7 +306,7 @@ class RoutingSpec extends AkkaSpec with DefaultTimeout {
|
|||
|
||||
val actor = new RoutedActorRef(system, props, impl.guardian, "foo")
|
||||
|
||||
Block.sync(actor ? Broadcast(0), timeout.duration).asInstanceOf[Int] must be(1)
|
||||
Await.result(actor ? Broadcast(0), timeout.duration).asInstanceOf[Int] must be(1)
|
||||
}
|
||||
|
||||
"be started when constructed" in {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue