Skip to content

Commit

Permalink
end spans at end of test case (#2766)
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight authored Mar 7, 2023
1 parent 8e76be4 commit c9724f9
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SentryPerformanceTrackerTests: XCTestCase {
}

func getSut() -> SentryPerformanceTracker {
return SentryPerformanceTracker()
return SentryPerformanceTracker()
}
}

Expand Down Expand Up @@ -280,7 +280,7 @@ class SentryPerformanceTrackerTests: XCTestCase {

let queue = DispatchQueue(label: "SentryPerformanceTrackerTests", attributes: [.concurrent, .initiallyInactive])
let group = DispatchGroup()

for _ in 0 ..< 5_000 {
group.enter()
queue.async {
Expand All @@ -294,6 +294,9 @@ class SentryPerformanceTrackerTests: XCTestCase {
}
let spans = getSpans(tracker: sut)
XCTAssertEqual(spans.count, 5_001)
for span in spans {
sut.finishSpan(span.key)
}
}

func testStackAsync() {
Expand Down

0 comments on commit c9724f9

Please sign in to comment.