diff --git a/Tests/SentryTests/Transaction/SentrySpanTests.swift b/Tests/SentryTests/Transaction/SentrySpanTests.swift index c1b70dc431c..e7f271f0d7a 100644 --- a/Tests/SentryTests/Transaction/SentrySpanTests.swift +++ b/Tests/SentryTests/Transaction/SentrySpanTests.swift @@ -603,7 +603,6 @@ class SentrySpanTests: XCTestCase { func testModifyingExtraFromMultipleThreads() { let queue = DispatchQueue(label: "SentrySpanTests", qos: .userInteractive, attributes: [.concurrent, .initiallyInactive]) - let group = DispatchGroup() let span = fixture.getSut() @@ -612,9 +611,13 @@ class SentrySpanTests: XCTestCase { let innerLoop = 1_000 let outerLoop = 20 let value = fixture.extraValue + + let expectation = XCTestExpectation(description: "ModifyingExtraFromMultipleThreads") + expectation.expectedFulfillmentCount = outerLoop + expectation.assertForOverFulfill = true for i in 0..