diff options
Diffstat (limited to 'kamon-core/src/test')
-rw-r--r-- | kamon-core/src/test/scala/kamon/trace/instrumentation/AskPatternTracingSpec.scala | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/kamon-core/src/test/scala/kamon/trace/instrumentation/AskPatternTracingSpec.scala b/kamon-core/src/test/scala/kamon/trace/instrumentation/AskPatternTracingSpec.scala index 04a5c0e3..fb886de6 100644 --- a/kamon-core/src/test/scala/kamon/trace/instrumentation/AskPatternTracingSpec.scala +++ b/kamon-core/src/test/scala/kamon/trace/instrumentation/AskPatternTracingSpec.scala @@ -1,21 +1,22 @@ -/* =================================================== +/* + * ========================================================================================= * Copyright © 2013 the kamon project <http://kamon.io/> * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language governing permissions + * and limitations under the License. + * ========================================================================================= + */ + package kamon.trace.instrumentation -import akka.testkit.TestKit +import akka.testkit.TestKitBase import akka.actor.{ Props, Actor, ActorSystem } import org.scalatest.{ Matchers, WordSpecLike } import akka.event.Logging.Warning @@ -23,9 +24,17 @@ import scala.concurrent.duration._ import akka.pattern.ask import akka.util.Timeout import kamon.trace.{ TraceContextAware, TraceRecorder } -import org.scalatest.OptionValues._ +import com.typesafe.config.ConfigFactory -class AskPatternTracingSpec extends TestKit(ActorSystem("ask-pattern-tracing-spec")) with WordSpecLike with Matchers { +class AskPatternTracingSpec extends TestKitBase with WordSpecLike with Matchers { + implicit lazy val system: ActorSystem = ActorSystem("ask-pattern-tracing-spec", ConfigFactory.parseString( + """ + |kamon { + | trace { + | ask-pattern-tracing = on + | } + |} + """.stripMargin)) "the AskPatternTracing" should { "log a warning with a stack trace and TraceContext taken from the moment the ask was triggered" in { |