Incorporate minor review feedback, see #944

This commit is contained in:
Patrik Nordwall 2012-09-17 09:30:52 +02:00
parent 50fc5a03a2
commit 08dbc4d235
2 changed files with 7 additions and 7 deletions

View file

@ -61,17 +61,17 @@ class ConsistentHashingRouterSpec extends AkkaSpec(ConsistentHashingRouterSpec.c
"select destination based on consistentHashKey of the message" in {
router1 ! Msg("a", "A")
val destinationA = expectMsgPF(remaining) { case ref: ActorRef ref }
val destinationA = expectMsgType[ActorRef]
router1 ! ConsistentHashableEnvelope(message = "AA", consistentHashKey = "a")
expectMsg(destinationA)
router1 ! Msg(17, "B")
val destinationB = expectMsgPF(remaining) { case ref: ActorRef ref }
val destinationB = expectMsgType[ActorRef]
router1 ! ConsistentHashableEnvelope(message = "BB", consistentHashKey = 17)
expectMsg(destinationB)
router1 ! Msg(MsgKey("c"), "C")
val destinationC = expectMsgPF(remaining) { case ref: ActorRef ref }
val destinationC = expectMsgType[ActorRef]
router1 ! ConsistentHashableEnvelope(message = "CC", consistentHashKey = MsgKey("c"))
expectMsg(destinationC)
}
@ -84,17 +84,17 @@ class ConsistentHashingRouterSpec extends AkkaSpec(ConsistentHashingRouterSpec.c
consistentHashRoute = consistentHashRoute)), "router2")
router2 ! Msg2("a", "A")
val destinationA = expectMsgPF(remaining) { case ref: ActorRef ref }
val destinationA = expectMsgType[ActorRef]
router2 ! ConsistentHashableEnvelope(message = "AA", consistentHashKey = "a")
expectMsg(destinationA)
router2 ! Msg2(17, "B")
val destinationB = expectMsgPF(remaining) { case ref: ActorRef ref }
val destinationB = expectMsgType[ActorRef]
router2 ! ConsistentHashableEnvelope(message = "BB", consistentHashKey = 17)
expectMsg(destinationB)
router2 ! Msg2(MsgKey("c"), "C")
val destinationC = expectMsgPF(remaining) { case ref: ActorRef ref }
val destinationC = expectMsgType[ActorRef]
router2 ! ConsistentHashableEnvelope(message = "CC", consistentHashKey = MsgKey("c"))
expectMsg(destinationC)
}

View file

@ -46,7 +46,7 @@ class ConsistentHashingRouterDocSpec extends AkkaSpec with ImplicitSender {
import akka.routing.ConsistentHashingRouter.ConsistentHashRoute
import akka.routing.ConsistentHashingRouter.ConsistentHashableEnvelope
def consistentHashRoute: ConsistentHashingRouter.ConsistentHashRoute = {
def consistentHashRoute: ConsistentHashRoute = {
case Evict(key) key
}