Skip to content

Commit 3e8b5b0

Browse files
authored
Update some tests to account for github slowness. (#342)
* Update some tests to account for github slowness. * Corrected expected failure.
1 parent 3b2093c commit 3e8b5b0

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Tests/Segment-Tests/Analytics_Tests.swift

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ final class Analytics_Tests: XCTestCase {
5252
analytics.identify(userId: "brandon", traits: traits)
5353
analytics.remove(plugin: ziggy)
5454

55-
wait(for: [expectation], timeout: 1.0)
55+
wait(for: [expectation], timeout: .infinity)
5656
}
5757

5858
func testDestinationInitialUpdateOnlyOnce() {
@@ -90,7 +90,7 @@ final class Analytics_Tests: XCTestCase {
9090
XCTAssertNotNil(dest)
9191
XCTAssertTrue(dest is MyDestination)
9292

93-
wait(for: [expectation], timeout: 1.0)
93+
wait(for: [expectation], timeout: .infinity)
9494

9595
XCTAssertEqual(myDestination.receivedInitialUpdate, 1)
9696
XCTAssertEqual(ziggy1.receivedInitialUpdate, 1)
@@ -130,7 +130,7 @@ final class Analytics_Tests: XCTestCase {
130130
XCTAssertNotNil(dest)
131131
XCTAssertTrue(dest is MyDestination)
132132

133-
wait(for: [expectation], timeout: 1.0)
133+
wait(for: [expectation], timeout: .infinity)
134134
}
135135

136136
// Linux doesn't support XCTExpectFailure
@@ -771,11 +771,7 @@ final class Analytics_Tests: XCTestCase {
771771
expectation.fulfill()
772772
}
773773

774-
#if os(iOS)
775-
wait(for: [expectation])
776-
#else
777-
wait(for: [expectation], timeout: 5)
778-
#endif
774+
wait(for: [expectation], timeout: .infinity)
779775

780776
XCTAssertNil(analytics.pendingUploads)
781777
}
@@ -800,7 +796,7 @@ final class Analytics_Tests: XCTestCase {
800796
expectation.fulfill()
801797
}
802798

803-
wait(for: [expectation], timeout: 10)
799+
wait(for: [expectation], timeout: .infinity)
804800

805801
XCTAssertNil(analytics.pendingUploads)
806802

@@ -915,7 +911,7 @@ final class Analytics_Tests: XCTestCase {
915911
expectation.fulfill()
916912
}
917913

918-
wait(for: [expectation], timeout: 1.0)
914+
wait(for: [expectation], timeout: .infinity)
919915

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

0 commit comments

Comments
 (0)