This is an automated email from the ASF dual-hosted git repository.
engelen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 524f82b66a fix: poll bind via UDP before starting tests (#2475)
524f82b66a is described below
commit 524f82b66a938f49ee006dd3000fac5180977158
Author: Arnout Engelen <[email protected]>
AuthorDate: Mon Nov 10 22:55:19 2025 +0100
fix: poll bind via UDP before starting tests (#2475)
Potential fix for #2398: perhaps Bind is simply not fully
started and ready to respond to queries when we see
'Starting BIND' - potentially more reliable to perform
an actual request?
---
.../pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala | 2 +-
.../scala/org/apache/pekko/io/dns/DockerBindDnsService.scala | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git
a/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala
b/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala
index 0aed5bc0aa..9959d08b53 100644
---
a/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala
+++
b/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala
@@ -72,7 +72,7 @@ class AsyncDnsResolverIntegrationSpec
system.log.info("Docker available. Running DNS tests")
}
- "resolve single A record" in {
+ "resolve a single A record" in {
val name = "a-single.foo.test"
val answer = resolve(name, DnsProtocol.Ip(ipv6 = false))
withClue(answer) {
diff --git
a/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala
b/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala
index 9d6ddcf3e0..66326512a6 100644
---
a/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala
+++
b/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala
@@ -17,7 +17,6 @@ import scala.concurrent.duration._
import scala.jdk.CollectionConverters._
import scala.util.Try
import scala.util.control.NonFatal
-
import com.github.dockerjava.api.DockerClient
import com.github.dockerjava.api.async.ResultCallback
import com.github.dockerjava.api.command.CreateContainerCmd
@@ -26,10 +25,11 @@ import com.github.dockerjava.core.{
DefaultDockerClientConfig, DockerClientConfi
import com.github.dockerjava.httpclient5.ApacheDockerHttpClient
import org.apache.pekko
-import pekko.testkit.PekkoSpec
+import pekko.io.{ Dns, IO }
+import pekko.util.Timeout
+import pekko.testkit.PekkoSpec
import org.scalatest.concurrent.Eventually
-
import com.typesafe.config.Config
abstract class DockerBindDnsService(config: Config) extends PekkoSpec(config)
with Eventually {
@@ -122,6 +122,12 @@ abstract class DockerBindDnsService(config: Config)
extends PekkoSpec(config) wi
reader.toString should include("Starting BIND")
}
+ eventually(timeout(25.seconds)) {
+ import pekko.pattern.ask
+ implicit val timeout: Timeout = 2.seconds
+ (IO(Dns) ? DnsProtocol.Resolve("a-single.foo.test", DnsProtocol.Ip(ipv6
= false))).mapTo[
+ DnsProtocol.Resolved].futureValue
+ }
}
def dumpNameserverLogs(): Unit = {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]