2018-12-04 09:20:29 +00:00
|
|
|
/*
|
2019-01-02 18:55:26 +08:00
|
|
|
* Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com>
|
2018-12-04 09:20:29 +00:00
|
|
|
*/
|
|
|
|
|
|
2019-05-01 08:12:09 +01:00
|
|
|
package akka.remote.classic
|
2018-12-04 09:20:29 +00:00
|
|
|
|
2019-05-01 08:12:09 +01:00
|
|
|
import akka.remote.RemoteSettings
|
2019-07-10 14:26:51 +02:00
|
|
|
import com.github.ghik.silencer.silent
|
2018-12-04 09:20:29 +00:00
|
|
|
import com.typesafe.config.ConfigFactory
|
|
|
|
|
import org.scalatest.{ Matchers, WordSpec }
|
|
|
|
|
|
2019-07-10 14:26:51 +02:00
|
|
|
@silent // deprecated
|
2018-12-04 09:20:29 +00:00
|
|
|
class RemoteSettingsSpec extends WordSpec with Matchers {
|
|
|
|
|
|
|
|
|
|
"Remote settings" must {
|
2019-05-01 08:12:09 +01:00
|
|
|
"default akka.remote.classic.log-frame-size-exceeding to off" in {
|
2018-12-04 09:20:29 +00:00
|
|
|
new RemoteSettings(ConfigFactory.load()).LogFrameSizeExceeding shouldEqual None
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-01 08:12:09 +01:00
|
|
|
"parse akka.remote.classic.log-frame-size-exceeding value as bytes" in {
|
2019-03-11 10:38:24 +01:00
|
|
|
new RemoteSettings(
|
|
|
|
|
ConfigFactory
|
2019-05-01 08:12:09 +01:00
|
|
|
.parseString("akka.remote.classic.log-frame-size-exceeding = 100b")
|
2019-03-11 10:38:24 +01:00
|
|
|
.withFallback(ConfigFactory.load())).LogFrameSizeExceeding shouldEqual Some(100)
|
2018-12-04 09:20:29 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|