typelevel / otel4s

An OpenTelemetry library for Scala based on Cats-Effect
https://typelevel.org/otel4s
Apache License 2.0
162 stars 30 forks source link

Fix flaky tests #676

Closed iRevive closed 2 months ago

iRevive commented 2 months ago

There are a few:

Example Job example: https://github.com/iRevive/otel4s/actions/runs/9029200539/job/24811085216 ``` ==> X org.typelevel.otel4s.sdk.trace.SdkTracerSuite.startUnmanaged: use Clock[F].realTime to set start and end if builder's time is undefined 0.133s munit.ComparisonFailException: /home/runner/work/otel4s/otel4s/core/trace/src/test/scala/org/typelevel/otel4s/trace/BaseTracerSuite.scala:649 648: // _ <- IO.println(tree.map(renderTree).mkString("\n")) 649: } yield assertEquals(tree, List(expected(now))) 650: } values are not the same => Obtained Nil => Diff (- obtained, + expected) -Nil +List( + Impl( + current = SpanInfo( + name = "span", + start = 1000000000 nanoseconds, + end = Some( + value = 1100000000 nanoseconds + ) + ), + children = Nil + ) +) ```