pekko/akka-actor-tests/src/test/scala/akka/config/ConfigSpec.scala

45 lines
2.2 KiB
Scala
Raw Normal View History

/**
* 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)" must {
"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"))
getString("akka.actor.default-dispatcher.type") must equal(Some("GlobalDispatcher"))
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.cluster.layer") must equal(Some("akka.remote.netty.NettyRemoteSupport"))
getInt("akka.cluster.server.port") must equal(Some(2552))
}
}
}