Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Niall Brennan committed Oct 4, 2023
1 parent 87070d8 commit 19dda64
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Tests/Segment-Tests/FlushPolicy_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,11 @@ class FlushPolicyTests: XCTestCase {
waitUntilStarted(analytics: analytics)
analytics.track(name: "blah", properties: nil)

let hasUnsent = analytics.hasUnsentEvents
XCTAssertTrue(hasUnsent)
XCTAssertTrue(analytics.hasUnsentEvents)

// sleep for 5 seconds for 4 second flush policy
RunLoop.main.run(until: Date.init(timeIntervalSinceNow: 5))
RunLoop.main.run(until: Date.init(timeIntervalSinceNow: 6))

let hasUnsent2 = analytics.hasUnsentEvents
XCTAssertFalse(hasUnsent2)
XCTAssertFalse(analytics.hasUnsentEvents)
}
}

0 comments on commit 19dda64

Please sign in to comment.