aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/test/scala/kamon/trace
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2014-03-24 23:56:07 -0300
committerIvan Topolnjak <ivantopo@gmail.com>2014-03-24 23:58:42 -0300
commitb77454ed16d2d01c2eea340dc0524aba1c962a4d (patch)
tree5e4f919539b016875956b28642741d71a361203c /kamon-core/src/test/scala/kamon/trace
parent8ed58faae77db3773ded06ccb8e8529cfb9031d6 (diff)
downloadKamon-b77454ed16d2d01c2eea340dc0524aba1c962a4d.tar.gz
Kamon-b77454ed16d2d01c2eea340dc0524aba1c962a4d.tar.bz2
Kamon-b77454ed16d2d01c2eea340dc0524aba1c962a4d.zip
ensure that kamon.trace.ask-pattern-tracing setting is honored, closes #4
Diffstat (limited to 'kamon-core/src/test/scala/kamon/trace')
-rw-r--r--kamon-core/src/test/scala/kamon/trace/instrumentation/AskPatternTracingSpec.scala37
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 {