diff options
Diffstat (limited to 'kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala')
-rw-r--r-- | kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala b/kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala index 5bc632f7..28dcde79 100644 --- a/kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala +++ b/kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala @@ -15,13 +15,13 @@ * ========================================================== */ package kamon.newrelic -import akka.testkit.{TestActor, TestProbe, TestKit} -import akka.actor.{Props, ActorRef, ActorSystem} +import akka.testkit.{ TestActor, TestProbe, TestKit } +import akka.actor.{ Props, ActorRef, ActorSystem } import org.scalatest.WordSpecLike import kamon.AkkaExtensionSwap import spray.can.Http import akka.io.IO -import akka.testkit.TestActor.{KeepRunning, AutoPilot} +import akka.testkit.TestActor.{ KeepRunning, AutoPilot } import spray.http._ import spray.http.HttpRequest import spray.http.HttpResponse @@ -43,7 +43,7 @@ class AgentSpec extends TestKit(ActorSystem("agent-spec")) with WordSpecLike { fakeHttpManager.setAutoPilot(new TestActor.AutoPilot { def run(sender: ActorRef, msg: Any): AutoPilot = { msg match { - case HttpRequest(_, uri, _, _, _) if rawMethodIs("get_redirect_host", uri) => + case HttpRequest(_, uri, _, _, _) if rawMethodIs("get_redirect_host", uri) ⇒ sender ! jsonResponse( """ | { @@ -53,7 +53,7 @@ class AgentSpec extends TestKit(ActorSystem("agent-spec")) with WordSpecLike { println("Selecting Collector") - case HttpRequest(_, uri, _, _, _) if rawMethodIs("connect", uri) => + case HttpRequest(_, uri, _, _, _) if rawMethodIs("connect", uri) ⇒ sender ! jsonResponse( """ | { @@ -77,7 +77,6 @@ class AgentSpec extends TestKit(ActorSystem("agent-spec")) with WordSpecLike { } }) - AkkaExtensionSwap.swap(system, Http, new IO.Extension { def manager: ActorRef = fakeHttpManager.ref }) |