Fix typo in lookup of ResolverConfiguration (#25826)
* Fix typo in lookup of ResolverConfiguration * Set a longer timeout for launching bind
This commit is contained in:
parent
9941f7d800
commit
8247c8df50
2 changed files with 3 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ import com.spotify.docker.client.DockerClient.LogsParam
|
||||||
import com.spotify.docker.client.messages.{ ContainerConfig, HostConfig, PortBinding }
|
import com.spotify.docker.client.messages.{ ContainerConfig, HostConfig, PortBinding }
|
||||||
import org.scalatest.concurrent.Eventually
|
import org.scalatest.concurrent.Eventually
|
||||||
|
|
||||||
|
import scala.concurrent.duration._
|
||||||
import scala.util.Try
|
import scala.util.Try
|
||||||
import scala.util.control.NonFatal
|
import scala.util.control.NonFatal
|
||||||
|
|
||||||
|
|
@ -56,7 +57,7 @@ trait DockerBindDnsService extends Eventually { self: AkkaSpec ⇒
|
||||||
|
|
||||||
client.startContainer(creation.id())
|
client.startContainer(creation.id())
|
||||||
|
|
||||||
eventually {
|
eventually(timeout(5.seconds)) {
|
||||||
client.logs(creation.id(), LogsParam.stderr()).readFully() should include("all zones loaded")
|
client.logs(creation.id(), LogsParam.stderr()).readFully() should include("all zones loaded")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ object DnsSettings {
|
||||||
// this method is used as a fallback in case JNDI results in an empty list
|
// 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
|
// this method will not work when running modularised of course since it needs access to internal sun classes
|
||||||
def getNameserversUsingReflection: Try[List[InetSocketAddress]] = {
|
def getNameserversUsingReflection: Try[List[InetSocketAddress]] = {
|
||||||
system.dynamicAccess.getClassFor("sun.net.dns.ResolerConfiguration")
|
system.dynamicAccess.getClassFor("sun.net.dns.ResolverConfiguration")
|
||||||
.flatMap { c ⇒
|
.flatMap { c ⇒
|
||||||
Try {
|
Try {
|
||||||
val open = c.getMethod("open")
|
val open = c.getMethod("open")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue