2011-03-08 04:58:57 +01:00
|
|
|
/**
|
2011-07-14 16:03:08 +02:00
|
|
|
* Copyright (C) 2009-2011 Typesafe Inc. <http://www.typesafe.com>
|
2011-03-08 04:58:57 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package akka.config
|
|
|
|
|
|
2011-10-11 16:05:48 +02:00
|
|
|
import akka.testkit.AkkaSpec
|
2011-10-20 23:37:54 +02:00
|
|
|
import akka.AkkaApplication
|
2011-03-08 04:58:57 +01:00
|
|
|
|
2011-10-20 23:37:54 +02:00
|
|
|
class ConfigSpec extends AkkaSpec(AkkaApplication("ConfigSpec", Configuration.fromFile("config/akka-reference.conf"))) {
|
2011-03-08 04:58:57 +01:00
|
|
|
|
2011-04-26 14:00:18 +02:00
|
|
|
"The default configuration file (i.e. akka-reference.conf)" must {
|
2011-03-08 04:58:57 +01:00
|
|
|
"contain all configuration properties for akka-actor that are used in code with their correct defaults" in {
|
2011-10-11 16:05:48 +02:00
|
|
|
|
|
|
|
|
val config = app.config
|
|
|
|
|
import config._
|
2011-03-08 04:58:57 +01:00
|
|
|
|
|
|
|
|
getList("akka.boot") must equal(Nil)
|
|
|
|
|
getString("akka.time-unit") must equal(Some("seconds"))
|
2011-05-18 12:44:37 +12:00
|
|
|
getString("akka.version") must equal(Some("2.0-SNAPSHOT"))
|
2011-03-08 04:58:57 +01:00
|
|
|
|
2011-08-15 11:15:56 +02:00
|
|
|
getString("akka.actor.default-dispatcher.type") must equal(Some("Dispatcher"))
|
2011-03-08 04:58:57 +01:00
|
|
|
getInt("akka.actor.default-dispatcher.keep-alive-time") must equal(Some(60))
|
2011-08-15 11:15:56 +02:00
|
|
|
getDouble("akka.actor.default-dispatcher.core-pool-size-factor") must equal(Some(8.0))
|
|
|
|
|
getDouble("akka.actor.default-dispatcher.max-pool-size-factor") must equal(Some(8.0))
|
2011-03-08 04:58:57 +01:00
|
|
|
getInt("akka.actor.default-dispatcher.executor-bounds") must equal(Some(-1))
|
2011-08-24 12:41:21 +02:00
|
|
|
getInt("akka.actor.default-dispatcher.task-queue-size") must equal(Some(-1))
|
|
|
|
|
getString("akka.actor.default-dispatcher.task-queue-type") must equal(Some("linked"))
|
2011-03-08 04:58:57 +01:00
|
|
|
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))
|
|
|
|
|
|
2011-09-19 15:21:18 +02:00
|
|
|
getString("akka.remote.layer") must equal(Some("akka.cluster.netty.NettyRemoteSupport"))
|
|
|
|
|
getInt("akka.remote.server.port") must equal(Some(2552))
|
2011-03-08 04:58:57 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|