This is an automated email from the ASF dual-hosted git repository.

pjfanning pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-http.git


The following commit(s) were added to refs/heads/main by this push:
     new c07f6260d add config support for RouteTestTimeout via application.conf 
(#1016)
c07f6260d is described below

commit c07f6260df3ce91d75130bcb58ddc1a52accf292
Author: PJ Fanning <[email protected]>
AuthorDate: Sun Apr 19 08:04:32 2026 +0200

    add config support for RouteTestTimeout via application.conf (#1016)
---
 http-testkit/src/main/resources/reference.conf                   | 1 +
 .../apache/pekko/http/scaladsl/testkit/RouteTestTimeout.scala    | 9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/http-testkit/src/main/resources/reference.conf 
b/http-testkit/src/main/resources/reference.conf
index 3f0707679..f156e194c 100644
--- a/http-testkit/src/main/resources/reference.conf
+++ b/http-testkit/src/main/resources/reference.conf
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: Apache-2.0
 
 pekko.http.testkit.marshalling.timeout = 1 s
+pekko.http.testkit.routes.timeout = 1 s
diff --git 
a/http-testkit/src/main/scala/org/apache/pekko/http/scaladsl/testkit/RouteTestTimeout.scala
 
b/http-testkit/src/main/scala/org/apache/pekko/http/scaladsl/testkit/RouteTestTimeout.scala
index 95e0fbaa4..3934fc119 100644
--- 
a/http-testkit/src/main/scala/org/apache/pekko/http/scaladsl/testkit/RouteTestTimeout.scala
+++ 
b/http-testkit/src/main/scala/org/apache/pekko/http/scaladsl/testkit/RouteTestTimeout.scala
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
+ * Copyright (C) 2009-2023 Lightbend Inc. <https://www.lightbend.com>
  */
 
 package org.apache.pekko.http.scaladsl.testkit
@@ -17,10 +17,13 @@ import scala.concurrent.duration._
 
 import org.apache.pekko
 import pekko.actor.ActorSystem
-import pekko.testkit._
+import pekko.http.impl.util.enhanceConfig
 
 case class RouteTestTimeout(duration: FiniteDuration)
 
 object RouteTestTimeout {
-  implicit def default(implicit system: ActorSystem): RouteTestTimeout = 
RouteTestTimeout(1.second.dilated)
+  implicit def default(implicit system: ActorSystem): RouteTestTimeout = {
+    val routesTimeout = 
system.settings.config.getFiniteDuration("pekko.http.testkit.routes.timeout")
+    RouteTestTimeout(routesTimeout)
+  }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to