Skip to content

Commit

Permalink
Update ActorSystemSpec.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Nov 2, 2023
1 parent f849603 commit f227a3b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,19 +392,19 @@ class ActorSystemSpec extends PekkoSpec(ActorSystemSpec.config) with ImplicitSen
}
} finally shutdown(sys)
}
"not include env variables in toString" in {
"not include username in toString" in {
// Actor System toString is output to logs and we don't want env variable values appearing in logs
// "pekko.test.env.var.home = ${HOME}\n"
val system =
ActorSystem(
"config-test-system",
ConfigFactory
.parseString(
"""pekko.test.java.property.home = "${user.home}"""")
.parseString("""pekko.test.java.property.home = "${user.home}"""")
.withFallback(PekkoSpec.testConf))
val debugText = system.settings.toString
val username = System.getProperty("user.name")
val userHome = System.getProperty("user.home")
(debugText should not).include(username)
(debugText should not).include(userHome)
debugText should include("<username>")
shutdown(system)
}
Expand Down

0 comments on commit f227a3b

Please sign in to comment.