Handle FromConfig in withFallback also, see #944
This commit is contained in:
parent
08dbc4d235
commit
d59612609f
2 changed files with 2 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ class ConsistentHashingRouterSpec extends AkkaSpec(ConsistentHashingRouterSpec.c
|
|||
import akka.routing.ConsistentHashingRouterSpec._
|
||||
implicit val ec = system.dispatcher
|
||||
|
||||
val router1 = system.actorOf(Props[Echo].withRouter(ConsistentHashingRouter()), "router1")
|
||||
val router1 = system.actorOf(Props[Echo].withRouter(FromConfig()), "router1")
|
||||
|
||||
"consistent hashing router" must {
|
||||
"create routees from configuration" in {
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ case class ConsistentHashingRouter(
|
|||
* that can't be defined in configuration.
|
||||
*/
|
||||
override def withFallback(other: RouterConfig): RouterConfig = other match {
|
||||
case fromConfig: FromConfig ⇒ this
|
||||
case otherRouter: ConsistentHashingRouter ⇒
|
||||
val useResizer =
|
||||
if (this.resizer.isEmpty && otherRouter.resizer.isDefined) otherRouter.resizer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue