diff options
author | Diego <diegolparra@gmail.com> | 2015-01-30 01:17:07 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2015-01-30 01:17:07 -0300 |
commit | b02f2c07bad4abdb128f5249b4e1a9eabfde4ce9 (patch) | |
tree | 2745ed6fa41e326c4f3a4f12c000d1310679a805 /kamon-play/src/test | |
parent | e3ff68809b31dd673aefa5b605d70bd40bc2c1d9 (diff) | |
download | Kamon-b02f2c07bad4abdb128f5249b4e1a9eabfde4ce9.tar.gz Kamon-b02f2c07bad4abdb128f5249b4e1a9eabfde4ce9.tar.bz2 Kamon-b02f2c07bad4abdb128f5249b4e1a9eabfde4ce9.zip |
= play: use our own dispatcher instead of Akka's default dispatcher and reduce verbosity of log in test
Diffstat (limited to 'kamon-play/src/test')
-rw-r--r-- | kamon-play/src/test/resources/logback.xml | 12 | ||||
-rw-r--r-- | kamon-play/src/test/resources/logger.xml | 16 | ||||
-rw-r--r-- | kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala | 4 |
3 files changed, 14 insertions, 18 deletions
diff --git a/kamon-play/src/test/resources/logback.xml b/kamon-play/src/test/resources/logback.xml new file mode 100644 index 00000000..c336bbfe --- /dev/null +++ b/kamon-play/src/test/resources/logback.xml @@ -0,0 +1,12 @@ +<configuration> + <statusListener class="ch.qos.logback.core.status.NopStatusListener"/> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> + </encoder> + </appender> + + <root level="OFF"> + <appender-ref ref="STDOUT"/> + </root> +</configuration>
\ No newline at end of file diff --git a/kamon-play/src/test/resources/logger.xml b/kamon-play/src/test/resources/logger.xml deleted file mode 100644 index 84126e9d..00000000 --- a/kamon-play/src/test/resources/logger.xml +++ /dev/null @@ -1,16 +0,0 @@ -<configuration scan="true"> - <conversionRule conversionWord="traceToken" converterClass="kamon.trace.logging.LogbackTraceTokenConverter" /> - <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> - <encoder> - <pattern>%date{HH:mm:ss.SSS} %-5level [%traceToken][%X{akkaSource}] [%thread] %logger{55} - %msg%n</pattern> - </encoder> - </appender> - - <logger name="play" level="INFO" /> - <logger name="application" level="INFO" /> - - <root level="INFO"> - <appender-ref ref="STDOUT" /> - </root> - -</configuration> diff --git a/kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala b/kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala index 3dec2ebf..795453d0 100644 --- a/kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala +++ b/kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala @@ -47,8 +47,8 @@ class WSInstrumentationSpec extends WordSpecLike with Matchers with OneServerPer val snapshot = takeSnapshotOf("GET: /inside") snapshot.histogram("elapsed-time").get.numberOfMeasurements should be(1) - // snapshot.segments.size should be(1) - // snapshot.segment("http://localhost:19001/async", SegmentCategory.HttpClient, Play.SegmentLibraryName).numberOfMeasurements should be(1) + snapshot.segments.size should be(1) + snapshot.segment("http://localhost:19001/async", SegmentCategory.HttpClient, Play.SegmentLibraryName).numberOfMeasurements should be(1) } "propagate the TraceContext outside an Action and complete the WS request" in { |