2012-01-20 14:29:50 +01:00
|
|
|
/**
|
2013-01-09 01:47:48 +01:00
|
|
|
* Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
|
2012-01-20 14:29:50 +01:00
|
|
|
*/
|
2011-11-22 13:04:10 +01:00
|
|
|
package akka.remote
|
2011-07-20 11:14:51 +03:00
|
|
|
|
2012-06-25 16:29:08 +02:00
|
|
|
import language.postfixOps
|
|
|
|
|
|
2011-10-11 16:05:48 +02:00
|
|
|
import akka.testkit.AkkaSpec
|
2012-01-25 16:50:06 +01:00
|
|
|
import akka.actor.ExtendedActorSystem
|
2012-09-21 14:50:06 +02:00
|
|
|
import scala.concurrent.duration._
|
2012-12-17 20:44:59 +01:00
|
|
|
import akka.util.Helpers
|
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])
|
2012-01-25 16:50:06 +01:00
|
|
|
class RemoteConfigSpec extends AkkaSpec(
|
|
|
|
|
"""
|
|
|
|
|
akka {
|
2012-02-02 11:46:52 +01:00
|
|
|
actor.provider = "akka.remote.RemoteActorRefProvider"
|
|
|
|
|
remote.netty.port = 0
|
2012-01-25 16:50:06 +01:00
|
|
|
}
|
|
|
|
|
""") {
|
2011-07-20 11:14:51 +03:00
|
|
|
|
2012-12-18 12:54:17 +01:00
|
|
|
// FIXME: These tests are ignored as it tests configuration specific to the old remoting.
|
2012-01-30 11:48:02 +01:00
|
|
|
"Remoting" must {
|
|
|
|
|
|
2012-11-23 10:15:19 +01:00
|
|
|
"be able to parse generic remote config elements" ignore {
|
2012-01-25 16:50:06 +01:00
|
|
|
val settings = system.asInstanceOf[ExtendedActorSystem].provider.asInstanceOf[RemoteActorRefProvider].remoteSettings
|
2012-01-20 14:29:50 +01:00
|
|
|
import settings._
|
|
|
|
|
|
|
|
|
|
RemoteTransport must be("akka.remote.netty.NettyRemoteTransport")
|
|
|
|
|
UntrustedMode must be(false)
|
|
|
|
|
RemoteSystemDaemonAckTimeout must be(30 seconds)
|
2012-08-17 14:48:16 +02:00
|
|
|
LogRemoteLifeCycleEvents must be(true)
|
2011-07-20 11:14:51 +03:00
|
|
|
}
|
2012-01-30 11:48:02 +01:00
|
|
|
|
2012-10-29 14:37:39 +01:00
|
|
|
"contain correct configuration values in reference.conf" in {
|
|
|
|
|
val c = system.asInstanceOf[ExtendedActorSystem].
|
|
|
|
|
provider.asInstanceOf[RemoteActorRefProvider].
|
|
|
|
|
remoteSettings.config.getConfig("akka.remote.netty")
|
|
|
|
|
|
|
|
|
|
// server-socket-worker-pool
|
|
|
|
|
{
|
|
|
|
|
val pool = c.getConfig("server-socket-worker-pool")
|
|
|
|
|
pool.getInt("pool-size-min") must equal(2)
|
|
|
|
|
pool.getDouble("pool-size-factor") must equal(1.0)
|
|
|
|
|
pool.getInt("pool-size-max") must equal(8)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// client-socket-worker-pool
|
|
|
|
|
{
|
|
|
|
|
val pool = c.getConfig("client-socket-worker-pool")
|
|
|
|
|
pool.getInt("pool-size-min") must equal(2)
|
|
|
|
|
pool.getDouble("pool-size-factor") must equal(1.0)
|
|
|
|
|
pool.getInt("pool-size-max") must equal(8)
|
|
|
|
|
}
|
2012-12-17 20:44:59 +01:00
|
|
|
|
|
|
|
|
{
|
|
|
|
|
c.getString("reuse-address") must be("off-for-windows")
|
|
|
|
|
}
|
2012-10-29 14:37:39 +01:00
|
|
|
}
|
2011-07-20 11:14:51 +03:00
|
|
|
}
|
|
|
|
|
}
|