add one more test for wildcard deployment
This commit is contained in:
parent
55dc5106a4
commit
27a0e533f8
1 changed files with 20 additions and 2 deletions
|
|
@ -7,8 +7,7 @@ import java.util.concurrent.atomic.AtomicInteger
|
|||
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import akka.actor.actorRef2Scala
|
||||
import akka.actor.{ Props, LocalActorRef, Deploy, Actor }
|
||||
import akka.actor.{ Props, LocalActorRef, Deploy, Actor, ActorRef }
|
||||
import akka.config.ConfigurationException
|
||||
import akka.dispatch.Await
|
||||
import akka.pattern.{ ask, gracefulStop }
|
||||
|
|
@ -31,6 +30,14 @@ object ConfiguredLocalRoutingSpec {
|
|||
router = random
|
||||
nr-of-instances = 4
|
||||
}
|
||||
/weird {
|
||||
router = round-robin
|
||||
nr-of-instances = 3
|
||||
}
|
||||
"/weird/*" {
|
||||
router = round-robin
|
||||
nr-of-instances = 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -88,6 +95,17 @@ class ConfiguredLocalRoutingSpec extends AkkaSpec(ConfiguredLocalRoutingSpec.con
|
|||
}
|
||||
}
|
||||
|
||||
"not get confused when trying to wildcard-configure children" in {
|
||||
val router = system.actorOf(Props(new Actor {
|
||||
testActor ! self
|
||||
def receive = { case _ ⇒ }
|
||||
}).withRouter(FromConfig), "weird")
|
||||
val recv = Set() ++ (for (_ ← 1 to 3) yield expectMsgType[ActorRef])
|
||||
val expc = Set('a', 'b', 'c') map (i ⇒ system.actorFor("/user/weird/$" + i))
|
||||
recv must be(expc)
|
||||
expectNoMsg(1 second)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
"round robin router" must {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue