diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2014-03-24 23:56:07 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-03-24 23:58:42 -0300 |
commit | a5cf2e2f600303ca1927d060196f95932153fe15 (patch) | |
tree | 6555ef9d95ac9110ed207b9e28244d5eae3cc8ac /kamon-core/src/test/scala | |
parent | c941dd2b2556d3046f308d2995049dd35e84b3e3 (diff) | |
download | Kamon-a5cf2e2f600303ca1927d060196f95932153fe15.tar.gz Kamon-a5cf2e2f600303ca1927d060196f95932153fe15.tar.bz2 Kamon-a5cf2e2f600303ca1927d060196f95932153fe15.zip |
ensure that kamon.trace.ask-pattern-tracing setting is honored, closes #4
Diffstat (limited to 'kamon-core/src/test/scala')
-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 { |