Skip to content

Commit

Permalink
wait for flushes to finish out ...
Browse files Browse the repository at this point in the history
  • Loading branch information
bsneed committed May 13, 2024
1 parent 36414a9 commit a5a7ecc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Tests/Segment-Tests/StressTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ class StressTests: XCTestCase {
RunLoop.main.run(until: Date.distantPast)
}

// wait for everything to settle down flush-wise...
while (analytics.hasUnsentEvents) {
RunLoop.main.run(until: Date(timeIntervalSinceNow: .seconds(5)))
}

analytics.purgeStorage()
}

Expand Down

0 comments on commit a5a7ecc

Please sign in to comment.