Fix compilation error on Scala 2.12 (#30741)

This commit is contained in:
Patrik Nordwall 2021-10-05 09:11:55 +02:00 committed by GitHub
parent f12d72effc
commit e20e55b148
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,6 @@ import akka.actor.typed.scaladsl._
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import org.slf4j.event.Level import org.slf4j.event.Level
import scala.jdk.CollectionConverters.MapHasAsJava
//#imports //#imports
import org.scalatest.matchers.should.Matchers import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec import org.scalatest.wordspec.AnyWordSpec
@ -145,8 +144,7 @@ class SyncTestingExampleSpec extends AnyWordSpec with Matchers {
"has access to the provided config" in { "has access to the provided config" in {
val conf = val conf =
BehaviorTestKit.ApplicationTestConfig.withFallback( BehaviorTestKit.ApplicationTestConfig.withFallback(ConfigFactory.parseString("test.secret=shhhhh"))
ConfigFactory.parseMap(Map("test.secret" -> "shhhhh").asJava))
val testKit = BehaviorTestKit(ConfigAware(), "root", conf) val testKit = BehaviorTestKit(ConfigAware(), "root", conf)
val inbox = TestInbox[AnyRef]("Inboxer") val inbox = TestInbox[AnyRef]("Inboxer")
testKit.run(ConfigAware.GetCfgString("test.secret", inbox.ref.narrow)) testKit.run(ConfigAware.GetCfgString("test.secret", inbox.ref.narrow))