diff options
Diffstat (limited to 'kamon-spray/src/test/scala/kamon/spray/TestServer.scala')
-rw-r--r-- | kamon-spray/src/test/scala/kamon/spray/TestServer.scala | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kamon-spray/src/test/scala/kamon/spray/TestServer.scala b/kamon-spray/src/test/scala/kamon/spray/TestServer.scala index 81242133..65506770 100644 --- a/kamon-spray/src/test/scala/kamon/spray/TestServer.scala +++ b/kamon-spray/src/test/scala/kamon/spray/TestServer.scala @@ -29,11 +29,9 @@ trait TestServer { def buildClientConnectionAndServer: (ActorRef, TestProbe) = { val serverHandler = TestProbe() IO(Http).tell(Http.Bind(listener = serverHandler.ref, interface = "127.0.0.1", port = 0), serverHandler.ref) - val bound = within(10 seconds) { - serverHandler.expectMsgType[Bound] - } - + val bound = serverHandler.expectMsgType[Bound](10 seconds) val client = clientConnection(bound) + serverHandler.expectMsgType[Http.Connected] serverHandler.reply(Http.Register(serverHandler.ref)) @@ -50,10 +48,7 @@ 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 = within(10 seconds) { - serverHandler.expectMsgType[Bound] - } - + val bound = serverHandler.expectMsgType[Bound](10 seconds) val client = httpHostConnector(bound) (client, serverHandler) |