Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-bli committed Aug 26, 2024
1 parent 1f04897 commit 4a6184f
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,16 @@ class OpenTelemetrySuite extends OpenTelemetryEnabled {
assert(l.size() == 1)
}

test("actions should be processed in the span time period") {
val result = session.sql("select current_timestamp()").collect().head.getTimestamp(0)
val l = testSpanExporter.getFinishedSpanItems
val spanStart = l.get(0).getStartEpochNanos / 1000000
val time = result.getTime
val spanEnd = l.get(0).getEndEpochNanos / 1000000
assert(spanStart < time)
assert(time < spanEnd)
}

override def beforeAll: Unit = {
super.beforeAll
createStage(stageName1)
Expand Down

0 comments on commit 4a6184f

Please sign in to comment.