Skip to content

Commit

Permalink
Update some tests to account for github slowness. (#342)
Browse files Browse the repository at this point in the history
* Update some tests to account for github slowness.

* Corrected expected failure.
  • Loading branch information
bsneed authored May 8, 2024
1 parent 3b2093c commit 3e8b5b0
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions Tests/Segment-Tests/Analytics_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ final class Analytics_Tests: XCTestCase {
analytics.identify(userId: "brandon", traits: traits)
analytics.remove(plugin: ziggy)

wait(for: [expectation], timeout: 1.0)
wait(for: [expectation], timeout: .infinity)
}

func testDestinationInitialUpdateOnlyOnce() {
Expand Down Expand Up @@ -90,7 +90,7 @@ final class Analytics_Tests: XCTestCase {
XCTAssertNotNil(dest)
XCTAssertTrue(dest is MyDestination)

wait(for: [expectation], timeout: 1.0)
wait(for: [expectation], timeout: .infinity)

XCTAssertEqual(myDestination.receivedInitialUpdate, 1)
XCTAssertEqual(ziggy1.receivedInitialUpdate, 1)
Expand Down Expand Up @@ -130,7 +130,7 @@ final class Analytics_Tests: XCTestCase {
XCTAssertNotNil(dest)
XCTAssertTrue(dest is MyDestination)

wait(for: [expectation], timeout: 1.0)
wait(for: [expectation], timeout: .infinity)
}

// Linux doesn't support XCTExpectFailure
Expand Down Expand Up @@ -771,11 +771,7 @@ final class Analytics_Tests: XCTestCase {
expectation.fulfill()
}

#if os(iOS)
wait(for: [expectation])
#else
wait(for: [expectation], timeout: 5)
#endif
wait(for: [expectation], timeout: .infinity)

XCTAssertNil(analytics.pendingUploads)
}
Expand All @@ -800,7 +796,7 @@ final class Analytics_Tests: XCTestCase {
expectation.fulfill()
}

wait(for: [expectation], timeout: 10)
wait(for: [expectation], timeout: .infinity)

XCTAssertNil(analytics.pendingUploads)

Expand Down Expand Up @@ -915,7 +911,7 @@ final class Analytics_Tests: XCTestCase {
expectation.fulfill()
}

wait(for: [expectation], timeout: 1.0)
wait(for: [expectation], timeout: .infinity)

let newStoredEvents: [URL]? = analytics.storage.read(.events)

Expand Down

0 comments on commit 3e8b5b0

Please sign in to comment.