Skip to content

Commit 7a8cf8f

Browse files
committed
use the correct timing expectation for tests
1 parent 5bb5953 commit 7a8cf8f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/unit-tests/IterableAPITests.swift

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class IterableAPITests: XCTestCase {
405405
}
406406
}
407407

408-
wait(for: [expectation], timeout: testExpectationTimeoutForInverted)
408+
wait(for: [expectation], timeout: testExpectationTimeout)
409409
}
410410

411411
func testDisableDeviceNotRegistered() {
@@ -443,9 +443,11 @@ class IterableAPITests: XCTestCase {
443443
guard let request = networkSession.getRequest(withEndPoint: Const.Path.disableDevice) else {
444444
return
445445
}
446+
446447
guard let body = TestUtils.getRequestBody(request: request) else {
447448
return
448449
}
450+
449451
TestUtils.validate(request: request,
450452
requestType: .post,
451453
apiEndPoint: Endpoint.api,
@@ -461,7 +463,7 @@ class IterableAPITests: XCTestCase {
461463
}
462464
}
463465

464-
wait(for: [expectation], timeout: testExpectationTimeoutForInverted)
466+
wait(for: [expectation], timeout: testExpectationTimeout)
465467
}
466468

467469
// Same test as above but without using success/failure callback
@@ -496,7 +498,7 @@ class IterableAPITests: XCTestCase {
496498
internalAPI.disableDeviceForCurrentUser()
497499
}
498500

499-
wait(for: [expectation], timeout: testExpectationTimeoutForInverted)
501+
wait(for: [expectation], timeout: testExpectationTimeout)
500502
}
501503

502504
func testDisableDeviceForAllUsers() {
@@ -535,7 +537,7 @@ class IterableAPITests: XCTestCase {
535537

536538
internalAPI.register(token: token)
537539

538-
wait(for: [expectation], timeout: testExpectationTimeoutForInverted)
540+
wait(for: [expectation], timeout: testExpectationTimeout)
539541
}
540542

541543
// Same test as above but without using success/failure callback
@@ -572,7 +574,7 @@ class IterableAPITests: XCTestCase {
572574
}
573575
internalAPI.register(token: token)
574576

575-
wait(for: [expectation], timeout: testExpectationTimeoutForInverted)
577+
wait(for: [expectation], timeout: testExpectationTimeout)
576578
}
577579

578580
func testUpdateCart() {
@@ -597,7 +599,7 @@ class IterableAPITests: XCTestCase {
597599
let itemsElement = body[JsonKey.Commerce.items] as! [[AnyHashable: Any]]
598600
XCTAssertEqual(itemsElement.count, items.count)
599601

600-
//TODO: create a CommerceItem matcher for use right here, and in trackPurchase tests
602+
// TODO: create a CommerceItem matcher for use right here, and in trackPurchase tests
601603

602604
condition1.fulfill()
603605
}

0 commit comments

Comments
 (0)