Merge pull request #26037 from chbatey/log-frame-size-exceeding-broken
Parse akka.remote.log-frame-size-exceeding as bytes
This commit is contained in:
commit
2f76b1a074
2 changed files with 23 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ final class RemoteSettings(val config: Config) {
|
|||
|
||||
val LogFrameSizeExceeding: Option[Int] = {
|
||||
if (config.getString("akka.remote.log-frame-size-exceeding").toLowerCase == "off") None
|
||||
else Some(getInt("akka.remote.log-frame-size-exceeding"))
|
||||
else Some(getBytes("akka.remote.log-frame-size-exceeding").toInt)
|
||||
}
|
||||
|
||||
val UntrustedMode: Boolean = getBoolean("akka.remote.untrusted-mode")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (C) 2018 Lightbend Inc. <https://www.lightbend.com>
|
||||
*/
|
||||
|
||||
package akka.remote
|
||||
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.{ Matchers, WordSpec }
|
||||
|
||||
class RemoteSettingsSpec extends WordSpec with Matchers {
|
||||
|
||||
"Remote settings" must {
|
||||
"default akka.remote.log-frame-size-exceeding to off" in {
|
||||
new RemoteSettings(ConfigFactory.load()).LogFrameSizeExceeding shouldEqual None
|
||||
}
|
||||
|
||||
"parse akka.remote.log-frame-size-exceeding value as bytes" in {
|
||||
new RemoteSettings(ConfigFactory.parseString("akka.remote.log-frame-size-exceeding = 100b").withFallback(ConfigFactory.load())).LogFrameSizeExceeding shouldEqual Some(100)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue