Skip to content

Commit

Permalink
Scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilquist committed Dec 17, 2022
1 parent b5f5bfe commit ba5fae7
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions modules/log/shared/src/test/scala/LogSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,18 @@ class LogSuite extends CatsEffectSuite {

test("continueOrElseRoot should preserve non-uuid trace from kernel") {
MockLogger.newInstance[IO]("test").flatMap { implicit log =>
val kernel = Kernel(Map(LogSpan.Headers.TraceId -> "non-uuid-trace-id", LogSpan.Headers.SpanId -> "non-uuid-parent-span-id"))
val traceId = Log.entryPoint[IO]("service", filter(_).spaces2)
.continueOrElseRoot("root span", kernel).use { root =>
root.traceId
}
val kernel = Kernel(
Map(
LogSpan.Headers.TraceId -> "non-uuid-trace-id",
LogSpan.Headers.SpanId -> "non-uuid-parent-span-id"
)
)
val traceId = Log
.entryPoint[IO]("service", filter(_).spaces2)
.continueOrElseRoot("root span", kernel)
.use { root =>
root.traceId
}

assertIO(traceId, Some("non-uuid-trace-id"))
}
Expand Down

0 comments on commit ba5fae7

Please sign in to comment.