You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2026/03/08 09:58:24 UTC
(pekko-http) branch main updated: test: port MethodDirectivesSpec timeout fix (#979)
This is an automated email from the ASF dual-hosted git repository.
hepin 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 260d3e621 test: port MethodDirectivesSpec timeout fix (#979)
260d3e621 is described below
commit 260d3e6214def20214273cf24f4ff4be63535408
Author: He-Pin(kerr) <he...@gmail.com>
AuthorDate: Sun Mar 8 17:58:19 2026 +0800
test: port MethodDirectivesSpec timeout fix (#979)
Port akka-http commit b85460691 by replacing a brittle 100 ms Await.result timeout with futureValue in MethodDirectivesSpec.
Co-authored-by: Copilot <22...@users.noreply.github.com>
---
.../pekko/http/scaladsl/server/directives/MethodDirectivesSpec.scala | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/http-tests/src/test/scala/org/apache/pekko/http/scaladsl/server/directives/MethodDirectivesSpec.scala b/http-tests/src/test/scala/org/apache/pekko/http/scaladsl/server/directives/MethodDirectivesSpec.scala
index 17f060e60..3d3d72cae 100644
--- a/http-tests/src/test/scala/org/apache/pekko/http/scaladsl/server/directives/MethodDirectivesSpec.scala
+++ b/http-tests/src/test/scala/org/apache/pekko/http/scaladsl/server/directives/MethodDirectivesSpec.scala
@@ -13,9 +13,6 @@
package org.apache.pekko.http.scaladsl.server.directives
-import scala.concurrent.Await
-import scala.concurrent.duration.Duration
-
import org.apache.pekko
import pekko.http.scaladsl.model.{ ContentTypes, HttpEntity, HttpMethods, StatusCodes }
import pekko.http.scaladsl.server._
@@ -50,7 +47,7 @@ class MethodDirectivesSpec extends RoutingSpec {
status shouldEqual StatusCodes.OK
val lengthF = response._3.dataBytes.runFold(0)((c, _) => c + 1)
- val length = Await.result(lengthF, Duration(100, "millis"))
+ val length = lengthF.futureValue
length shouldEqual 0
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org