Skip to content

Commit dced264

Browse files
test: Fewer iterations in abnormal session IO test (#4986)
Reduce the iterations from 1000 to 100 to reduce the risk of the test expectation to time out.
1 parent ae586b2 commit dced264

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tests/SentryTests/Helper/SentryFileManagerTests.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,12 @@ class SentryFileManagerTests: XCTestCase {
567567

568568
func testAbnormalSessionAsync_DoesNotCrash() {
569569
// Arrange
570-
let iterations = 1_000
570+
571+
// Using 100 iterations because it's still enough to find race conditions and
572+
// synchronization issues that could lead to crashes, but it's small enough to not
573+
// time out in CI.
574+
// If you want to use this to find synchronization issues, you should increase the number of iterations.
575+
let iterations = 100
571576
let expectation = expectation(description: "complete all abnormal session interactions")
572577
expectation.expectedFulfillmentCount = iterations * 3
573578
let dispatchQueue = DispatchQueue(label: "testAbnormalSessionAsync_DoesNotCrash", qos: .userInitiated, attributes: [.concurrent])

0 commit comments

Comments
 (0)