2011-11-22 13:04:10 +01:00
|
|
|
package akka.remote
|
2011-07-20 11:14:51 +03:00
|
|
|
|
2011-10-11 16:05:48 +02:00
|
|
|
import akka.testkit.AkkaSpec
|
2011-07-20 11:14:51 +03:00
|
|
|
|
2011-10-21 17:01:22 +02:00
|
|
|
@org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner])
|
2011-11-22 13:04:10 +01:00
|
|
|
class RemoteConfigSpec extends AkkaSpec {
|
2011-07-20 11:14:51 +03:00
|
|
|
|
2011-08-08 09:11:39 +03:00
|
|
|
"ClusterSpec: A Deployer" must {
|
2011-07-20 11:14:51 +03:00
|
|
|
"be able to parse 'akka.actor.cluster._' config elements" in {
|
2011-10-11 16:05:48 +02:00
|
|
|
|
2011-11-24 18:53:18 +01:00
|
|
|
val config = RemoteExtension(system).config
|
2011-10-11 16:05:48 +02:00
|
|
|
import config._
|
2011-07-20 11:14:51 +03:00
|
|
|
|
2011-11-25 15:42:25 +01:00
|
|
|
//akka.remote
|
|
|
|
|
getString("akka.remote.layer") must equal("akka.cluster.netty.NettyRemoteSupport")
|
|
|
|
|
getString("akka.remote.secure-cookie") must equal("")
|
|
|
|
|
getBoolean("akka.remote.use-passive-connections") must equal(true)
|
|
|
|
|
// getMilliseconds("akka.remote.remote-daemon-ack-timeout") must equal(30 * 1000)
|
|
|
|
|
|
2011-11-22 13:04:10 +01:00
|
|
|
//akka.remote.server
|
|
|
|
|
getInt("akka.remote.server.port") must equal(2552)
|
|
|
|
|
getInt("akka.remote.server.message-frame-size") must equal(1048576)
|
|
|
|
|
getMilliseconds("akka.remote.server.connection-timeout") must equal(120 * 1000)
|
|
|
|
|
getBoolean("akka.remote.server.require-cookie") must equal(false)
|
|
|
|
|
getBoolean("akka.remote.server.untrusted-mode") must equal(false)
|
|
|
|
|
getInt("akka.remote.server.backlog") must equal(4096)
|
|
|
|
|
|
|
|
|
|
//akka.remote.client
|
|
|
|
|
getBoolean("akka.remote.client.buffering.retry-message-send-on-failure") must equal(false)
|
|
|
|
|
getInt("akka.remote.client.buffering.capacity") must equal(-1)
|
|
|
|
|
getMilliseconds("akka.remote.client.reconnect-delay") must equal(5 * 1000)
|
|
|
|
|
getMilliseconds("akka.remote.client.read-timeout") must equal(3600 * 1000)
|
|
|
|
|
getMilliseconds("akka.remote.client.reconnection-time-window") must equal(600 * 1000)
|
|
|
|
|
|
|
|
|
|
// TODO cluster config will go into akka-cluster-reference.conf when we enable that module
|
2011-07-20 11:14:51 +03:00
|
|
|
//akka.cluster
|
2011-11-25 15:42:25 +01:00
|
|
|
getString("akka.cluster.name") must equal("default-cluster")
|
|
|
|
|
getString("akka.cluster.nodename") must equal("")
|
|
|
|
|
getStringList("akka.cluster.seed-nodes") must equal(new java.util.ArrayList[String])
|
|
|
|
|
|
|
|
|
|
// getMilliseconds("akka.cluster.max-time-to-wait-until-connected") must equal(30 * 1000)
|
|
|
|
|
// getMilliseconds("akka.cluster.session-timeout") must equal(60 * 1000)
|
|
|
|
|
// getMilliseconds("akka.cluster.connection-timeout") must equal(60 * 1000)
|
|
|
|
|
// getBoolean("akka.cluster.include-ref-node-in-replica-set") must equal(true)
|
|
|
|
|
// getString("akka.cluster.log-directory") must equal("_akka_cluster")
|
|
|
|
|
|
|
|
|
|
// //akka.cluster.replication
|
|
|
|
|
// getString("akka.cluster.replication.digest-type") must equal("MAC")
|
|
|
|
|
// getString("akka.cluster.replication.password") must equal("secret")
|
|
|
|
|
// getInt("akka.cluster.replication.ensemble-size") must equal(3)
|
|
|
|
|
// getInt("akka.cluster.replication.quorum-size") must equal(2)
|
|
|
|
|
// getInt("akka.cluster.replication.snapshot-frequency") must equal(1000)
|
|
|
|
|
// getMilliseconds("akka.cluster.replication.timeout") must equal(30 * 1000)
|
2011-07-20 11:14:51 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|