0

I am using the akka-http test suite. I have the following code, where the test "fails" whenever I delay the server response by more than 1 second.

"should give default" in {
    Get("/test/") ~> route ~> check {
      responseAs[Array[Byte]] shouldEqual defaultImage
    } 
  }

The error message is:

Request was neither completed nor rejected within 1 second

Is it possible to modify this waiting time, for instance with an implicit?

Cœur
  • 37,241
  • 25
  • 195
  • 267
stian
  • 1,947
  • 5
  • 25
  • 47

1 Answers1

0

You can provide your own RouteTestTimeout implicit to override the timeout, the default definition is:

implicit def default(implicit system: ActorSystem) = RouteTestTimeout(1.second dilated)

Source

alextsc
  • 1,368
  • 1
  • 8
  • 13