From 8247c8df508cd6fe8780d6f789246f78836f9e71 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 5 Nov 2018 06:05:16 -0800 Subject: [PATCH] Fix typo in lookup of ResolverConfiguration (#25826) * Fix typo in lookup of ResolverConfiguration * Set a longer timeout for launching bind --- .../src/test/scala/akka/io/dns/DockerBindDnsService.scala | 3 ++- akka-actor/src/main/scala/akka/io/dns/DnsSettings.scala | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/akka-actor-tests/src/test/scala/akka/io/dns/DockerBindDnsService.scala b/akka-actor-tests/src/test/scala/akka/io/dns/DockerBindDnsService.scala index d21e4a5f03..53a1e22fcf 100644 --- a/akka-actor-tests/src/test/scala/akka/io/dns/DockerBindDnsService.scala +++ b/akka-actor-tests/src/test/scala/akka/io/dns/DockerBindDnsService.scala @@ -11,6 +11,7 @@ import com.spotify.docker.client.DockerClient.LogsParam import com.spotify.docker.client.messages.{ ContainerConfig, HostConfig, PortBinding } import org.scalatest.concurrent.Eventually +import scala.concurrent.duration._ import scala.util.Try import scala.util.control.NonFatal @@ -56,7 +57,7 @@ trait DockerBindDnsService extends Eventually { self: AkkaSpec ⇒ client.startContainer(creation.id()) - eventually { + eventually(timeout(5.seconds)) { client.logs(creation.id(), LogsParam.stderr()).readFully() should include("all zones loaded") } } diff --git a/akka-actor/src/main/scala/akka/io/dns/DnsSettings.scala b/akka-actor/src/main/scala/akka/io/dns/DnsSettings.scala index 2a5a190e9a..0000ae92b0 100644 --- a/akka-actor/src/main/scala/akka/io/dns/DnsSettings.scala +++ b/akka-actor/src/main/scala/akka/io/dns/DnsSettings.scala @@ -116,7 +116,7 @@ object DnsSettings { // this method is used as a fallback in case JNDI results in an empty list // this method will not work when running modularised of course since it needs access to internal sun classes def getNameserversUsingReflection: Try[List[InetSocketAddress]] = { - system.dynamicAccess.getClassFor("sun.net.dns.ResolerConfiguration") + system.dynamicAccess.getClassFor("sun.net.dns.ResolverConfiguration") .flatMap { c ⇒ Try { val open = c.getMethod("open")