diff --git a/src/test/scala/com/snowflake/snowpark_test/OpenTelemetrySuite.scala b/src/test/scala/com/snowflake/snowpark_test/OpenTelemetrySuite.scala index 278437fd..aba7a142 100644 --- a/src/test/scala/com/snowflake/snowpark_test/OpenTelemetrySuite.scala +++ b/src/test/scala/com/snowflake/snowpark_test/OpenTelemetrySuite.scala @@ -449,16 +449,28 @@ class OpenTelemetrySuite extends OpenTelemetryEnabled { } test("actions should be processed in the span time period") { + val time1 = System.currentTimeMillis() val result = ActionInfo("ClassA", "functionB", "fileC", 123, "chainD").emit { Thread.sleep(1) val time = System.currentTimeMillis() Thread.sleep(1) time } + val time2 = System.currentTimeMillis() val l = testSpanExporter.getFinishedSpanItems val spanStart = l.get(0).getStartEpochNanos / 1000000 val spanEnd = l.get(0).getEndEpochNanos / 1000000 - assert(spanStart < spanEnd) + // scalastyle:off + println( + s""" + |XXXXX + |time1: $time1 + |time2: $time2 + |result: $result + |spanStart: $spanStart + |spanEnd: $spanEnd + |""".stripMargin) + // scalastyle:on assert(spanStart < result) assert(result < spanEnd) }