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
|
|
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
|
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 {
|
|
|
|
|
import Config.config._
|
|
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|