diff options
Diffstat (limited to 'kamon-play/src/test/scala/kamon/play')
-rw-r--r-- | kamon-play/src/test/scala/kamon/play/RequestInstrumentationSpec.scala | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kamon-play/src/test/scala/kamon/play/RequestInstrumentationSpec.scala b/kamon-play/src/test/scala/kamon/play/RequestInstrumentationSpec.scala index 3feb6246..aec319d5 100644 --- a/kamon-play/src/test/scala/kamon/play/RequestInstrumentationSpec.scala +++ b/kamon-play/src/test/scala/kamon/play/RequestInstrumentationSpec.scala @@ -174,13 +174,13 @@ class RequestInstrumentationSpec extends PlaySpec with OneServerPerSuite { } object TraceLocalFilter extends Filter { - override def apply(next: (RequestHeader) ⇒ Future[Result])(header: RequestHeader): Future[Result] = { + override def apply(next: (RequestHeader) ⇒ Future[SimpleResult])(header: RequestHeader): Future[SimpleResult] = { TraceRecorder.withTraceContext(TraceRecorder.currentContext) { TraceLocal.store(TraceLocalKey)(header.headers.get(traceLocalStorageKey).getOrElse("unknown")) next(header).map { - result ⇒ result.withHeaders((traceLocalStorageKey -> TraceLocal.retrieve(TraceLocalKey).get)) + result ⇒ result.withHeaders(traceLocalStorageKey -> TraceLocal.retrieve(TraceLocalKey).get) } } } @@ -225,16 +225,16 @@ object Routes extends Router.Routes { def routes: PartialFunction[RequestHeader, Handler] = { case Application_getRouted(params) ⇒ call { - createInvoker(controllers.Application.getRouted, - HandlerDef(this.getClass.getClassLoader, "", "controllers.Application", "getRouted", Nil, "GET", """some comment""", Routes.prefix + """getRouted""")).call(controllers.Application.getRouted) + invokeHandler(controllers.Application.getRouted, + HandlerDef(this, "controllers.Application", "getRouted", Nil, "GET", """some comment""", Routes.prefix + """getRouted""")) } case Application_postRouted(params) ⇒ call { - createInvoker(controllers.Application.postRouted, - HandlerDef(this.getClass.getClassLoader, "", "controllers.Application", "postRouted", Nil, "POST", """some comment""", Routes.prefix + """postRouted""")).call(controllers.Application.postRouted) + invokeHandler(controllers.Application.postRouted, + HandlerDef(this, "controllers.Application", "postRouted", Nil, "POST", """some comment""", Routes.prefix + """postRouted""")) } case Application_show(params) ⇒ call(params.fromPath[Int]("id", None)) { (id) ⇒ - createInvoker(controllers.Application.showRouted(id), - HandlerDef(this.getClass.getClassLoader, "", "controllers.Application", "showRouted", Seq(classOf[Int]), "GET", """""", Routes.prefix + """show/some/$id<[^/]+>""")).call(controllers.Application.showRouted(id)) + invokeHandler(controllers.Application.showRouted(id), + HandlerDef(this, "controllers.Application", "showRouted", Seq(classOf[Int]), "GET", """some comment""", Routes.prefix + """show/some/$id<[^/]+>""")) } } } @@ -253,4 +253,4 @@ object controllers { Ok("invoked show with: " + id) } } -}
\ No newline at end of file +} |