pekko/akka-docs/modules/code/akka/docs/actor/mailbox/DurableMailboxDocSpec.scala
Patrik Nordwall f772b0183e Initial commit of dispatcher key refactoring, for review. See #1458
* Changed signatures and constructor of MessageDispatcherConfigurator
* Changed Dispatchers.lookup, keep configurators instead of dispatchers
* Removed most of the Dispatchers.newX methods, newDispatcher is still there because of priority mailbox
* How should we make it easy to configure priority mailbox?
* Changed tons tests
* Documentation and ScalaDoc is not updated yet
* Some tests in ActorModelSpec are temporary ignored due to failure
2011-12-21 13:27:50 +01:00

40 lines
869 B
Scala

/**
* Copyright (C) 2009-2011 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.docs.actor.mailbox
//#imports
import akka.actor.Props
//#imports
import org.scalatest.{ BeforeAndAfterAll, WordSpec }
import org.scalatest.matchers.MustMatchers
import akka.testkit.AkkaSpec
import akka.actor.Actor
class MyActor extends Actor {
def receive = {
case x
}
}
object DurableMailboxDocSpec {
val config = """
//#dispatcher-config
my-dispatcher {
mailboxType = akka.actor.mailbox.FileBasedMailbox
}
//#dispatcher-config
"""
}
class DurableMailboxDocSpec extends AkkaSpec(DurableMailboxDocSpec.config) {
"configuration of dispatcher with durable mailbox" in {
//#dispatcher-config-use
val myActor = system.actorOf(Props[MyActor].withDispatcher("my-dispatcher"), name = "myactor")
//#dispatcher-config-use
}
}