re #689: Verified config for akka-actor.

This commit is contained in:
Heiko Seeberger 2011-03-08 04:58:57 +01:00 committed by Viktor Klang
parent 31300250a1
commit 031b5c22ef
2 changed files with 53 additions and 4 deletions

View file

@ -0,0 +1,46 @@
/**
* Copyright (C) 2009-2011 Scalable Solutions AB <http://scalablesolutions.se>
*/
package akka.config
import org.junit.runner.RunWith
import org.scalatest.WordSpec
import org.scalatest.junit.JUnitRunner
import org.scalatest.matchers.MustMatchers
@RunWith(classOf[JUnitRunner])
class ConfigSpec extends WordSpec with MustMatchers {
"The default configuration file (i.e. akka-reference.conf)" should {
"contain all configuration properties for akka-actor that are used in code with their correct defaults" in {
import Config.config._
getList("akka.boot") must equal(Nil)
getBool("akka.default-error-handler") must equal(Some(true))
getString("akka.time-unit") must equal(Some("seconds"))
getString("akka.version") must equal(Some("1.1-SNAPSHOT"))
getString("akka.actor.default-dispatcher.type") must equal(Some("GlobalExecutorBasedEventDriven"))
getInt("akka.actor.default-dispatcher.keep-alive-time") must equal(Some(60))
getDouble("akka.actor.default-dispatcher.core-pool-size-factor") must equal(Some(1.0))
getDouble("akka.actor.default-dispatcher.max-pool-size-factor") must equal(Some(4.0))
getInt("akka.actor.default-dispatcher.executor-bounds") must equal(Some(-1))
getBool("akka.actor.default-dispatcher.allow-core-timeout") must equal(Some(true))
getString("akka.actor.default-dispatcher.rejection-policy") must equal(Some("caller-runs"))
getInt("akka.actor.default-dispatcher.mailbox-capacity") must equal(Some(-1))
getInt("akka.actor.default-dispatcher.mailbox-push-timeout-time") must equal(Some(10))
getLong("akka.actor.dispatcher-shutdown-timeout") must equal(Some(1))
getInt("akka.actor.default-dispatcher.throughput") must equal(Some(5))
getInt("akka.actor.default-dispatcher.throughput-deadline-time") must equal(Some(-1))
getBool("akka.actor.serialize-messages") must equal(Some(false))
getInt("akka.actor.timeout") must equal(Some(5))
getInt("akka.actor.throughput") must equal(Some(5))
getInt("akka.actor.throughput-deadline-time") must equal(Some(-1))
getString("akka.remote.layer") must equal(Some("akka.remote.netty.NettyRemoteSupport"))
getString("akka.remote.server.hostname") must equal(Some("localhost"))
getInt("akka.remote.server.port") must equal(Some(2552))
}
}
}

View file

@ -17,10 +17,11 @@ akka {
# These boot classes are loaded (and created) automatically when the Akka Microkernel boots up
# Can be used to bootstrap your application(s)
# Should be the FQN (Fully Qualified Name) of the boot class which needs to have a default constructor
boot = ["sample.camel.Boot",
"sample.rest.java.Boot",
"sample.rest.scala.Boot",
"sample.security.Boot"]
# boot = ["sample.camel.Boot",
# "sample.rest.java.Boot",
# "sample.rest.scala.Boot",
# "sample.security.Boot"]
boot = []
actor {
timeout = 5 # Default timeout for Future based invocations
@ -118,6 +119,8 @@ akka {
compression-scheme = "zlib" # Options: "zlib" (lzf to come), leave out for no compression
zlib-compression-level = 6 # Options: 0-9 (1 being fastest and 9 being the most compressed), default is 6
layer = "akka.remote.netty.NettyRemoteSupport"
server {
hostname = "localhost" # The hostname or IP that clients should connect to
port = 2552 # The port clients should connect to. Default is 2552 (AKKA)