aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kamon-spray/src/test/scala/kamon/spray/TestServer.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/kamon-spray/src/test/scala/kamon/spray/TestServer.scala b/kamon-spray/src/test/scala/kamon/spray/TestServer.scala
index b448eb02..81242133 100644
--- a/kamon-spray/src/test/scala/kamon/spray/TestServer.scala
+++ b/kamon-spray/src/test/scala/kamon/spray/TestServer.scala
@@ -50,7 +50,9 @@ trait TestServer {
def buildSHostConnectorAndServer: (ActorRef, TestProbe) = {
val serverHandler = TestProbe()
IO(Http).tell(Http.Bind(listener = serverHandler.ref, interface = "127.0.0.1", port = 0), serverHandler.ref)
- val bound = serverHandler.expectMsgType[Bound]
+ val bound = within(10 seconds) {
+ serverHandler.expectMsgType[Bound]
+ }
val client = httpHostConnector(bound)