diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-08-30 13:36:27 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-08-30 13:36:27 +0200 |
commit | 539b54c3b43c68ad418ca77032f557a4da3e3a59 (patch) | |
tree | 8f7a5f7528bc6fc16afb0351661e1d4b5687f41a /kamon-jdbc/src/test/scala | |
parent | 110fff9745a0c1f154ee3d7a5149cd9f162a879f (diff) | |
download | Kamon-539b54c3b43c68ad418ca77032f557a4da3e3a59.tar.gz Kamon-539b54c3b43c68ad418ca77032f557a4da3e3a59.tar.bz2 Kamon-539b54c3b43c68ad418ca77032f557a4da3e3a59.zip |
wip: only the modules that actually require an actor system are getting one.
Diffstat (limited to 'kamon-jdbc/src/test/scala')
-rw-r--r-- | kamon-jdbc/src/test/scala/kamon/jdbc/instrumentation/StatementInstrumentationSpec.scala | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/kamon-jdbc/src/test/scala/kamon/jdbc/instrumentation/StatementInstrumentationSpec.scala b/kamon-jdbc/src/test/scala/kamon/jdbc/instrumentation/StatementInstrumentationSpec.scala index 80107dff..a7781447 100644 --- a/kamon-jdbc/src/test/scala/kamon/jdbc/instrumentation/StatementInstrumentationSpec.scala +++ b/kamon-jdbc/src/test/scala/kamon/jdbc/instrumentation/StatementInstrumentationSpec.scala @@ -18,31 +18,11 @@ package kamon.jdbc.instrumentation import java.sql.{ DriverManager, SQLException } import com.typesafe.config.ConfigFactory -import kamon.jdbc.{ Jdbc, JdbcNameGenerator, SqlErrorProcessor, SlowQueryProcessor } -import kamon.metric.TraceMetricsSpec +import kamon.jdbc.{ JdbcExtension, JdbcNameGenerator, SqlErrorProcessor, SlowQueryProcessor } import kamon.testkit.BaseKamonSpec import kamon.trace.{ Tracer, SegmentCategory } class StatementInstrumentationSpec extends BaseKamonSpec("jdbc-spec") { - override lazy val config = - ConfigFactory.parseString( - """ - |kamon { - | jdbc { - | slow-query-threshold = 100 milliseconds - | - | # Fully qualified name of the implementation of kamon.jdbc.SlowQueryProcessor. - | slow-query-processor = kamon.jdbc.instrumentation.NoOpSlowQueryProcessor - | - | # Fully qualified name of the implementation of kamon.jdbc.SqlErrorProcessor. - | sql-error-processor = kamon.jdbc.instrumentation.NoOpSqlErrorProcessor - | - | # Fully qualified name of the implementation of kamon.jdbc.JdbcNameGenerator - | name-generator = kamon.jdbc.instrumentation.NoOpJdbcNameGenerator - | } - |} - """.stripMargin) - val connection = DriverManager.getConnection("jdbc:h2:mem:jdbc-spec", "SA", "") override protected def beforeAll(): Unit = { @@ -79,7 +59,7 @@ class StatementInstrumentationSpec extends BaseKamonSpec("jdbc-spec") { tags = Map( "trace" -> "jdbc-trace-insert", "category" -> SegmentCategory.Database, - "library" -> Jdbc.SegmentLibraryName)) + "library" -> JdbcExtension.SegmentLibraryName)) segmentSnapshot.histogram("elapsed-time").get.numberOfMeasurements should be(100) } @@ -105,7 +85,7 @@ class StatementInstrumentationSpec extends BaseKamonSpec("jdbc-spec") { tags = Map( "trace" -> "jdbc-trace-select", "category" -> SegmentCategory.Database, - "library" -> Jdbc.SegmentLibraryName)) + "library" -> JdbcExtension.SegmentLibraryName)) segmentSnapshot.histogram("elapsed-time").get.numberOfMeasurements should be(100) } @@ -131,7 +111,7 @@ class StatementInstrumentationSpec extends BaseKamonSpec("jdbc-spec") { tags = Map( "trace" -> "jdbc-trace-update", "category" -> SegmentCategory.Database, - "library" -> Jdbc.SegmentLibraryName)) + "library" -> JdbcExtension.SegmentLibraryName)) segmentSnapshot.histogram("elapsed-time").get.numberOfMeasurements should be(100) } @@ -157,7 +137,7 @@ class StatementInstrumentationSpec extends BaseKamonSpec("jdbc-spec") { tags = Map( "trace" -> "jdbc-trace-delete", "category" -> SegmentCategory.Database, - "library" -> Jdbc.SegmentLibraryName)) + "library" -> JdbcExtension.SegmentLibraryName)) segmentSnapshot.histogram("elapsed-time").get.numberOfMeasurements should be(100) |