@@ -378,7 +378,7 @@ class AuthTests: XCTestCase {
378
378
} )
379
379
380
380
let expirationRefreshPeriod : TimeInterval = 0
381
- let waitTime : TimeInterval = 2
381
+ let waitTime : TimeInterval = 1.0
382
382
let expirationTimeSinceEpoch = Date ( timeIntervalSinceNow: expirationRefreshPeriod + waitTime) . timeIntervalSince1970
383
383
let mockEncodedPayload = createMockEncodedPayload ( exp: Int ( expirationTimeSinceEpoch) )
384
384
@@ -405,7 +405,7 @@ class AuthTests: XCTestCase {
405
405
} )
406
406
407
407
let expirationRefreshPeriod : TimeInterval = 0
408
- let waitTime : TimeInterval = 2
408
+ let waitTime : TimeInterval = 1.0
409
409
let expirationTimeSinceEpoch = Date ( timeIntervalSinceNow: expirationRefreshPeriod + waitTime) . timeIntervalSince1970
410
410
let mockEncodedPayload = createMockEncodedPayload ( exp: Int ( expirationTimeSinceEpoch) )
411
411
@@ -595,7 +595,7 @@ class AuthTests: XCTestCase {
595
595
596
596
class AsyncAuthDelegate : IterableAuthDelegate {
597
597
func onAuthTokenRequested( completion: @escaping AuthTokenRetrievalHandler ) {
598
- DispatchQueue . main. asyncAfter ( deadline: . now( ) + 3 ) {
598
+ DispatchQueue . main. asyncAfter ( deadline: . now( ) + 0.1 ) {
599
599
completion ( AuthTests . authToken)
600
600
}
601
601
}
@@ -670,7 +670,7 @@ class AuthTests: XCTestCase {
670
670
671
671
class AsyncAuthDelegate : IterableAuthDelegate {
672
672
func onAuthTokenRequested( completion: @escaping AuthTokenRetrievalHandler ) {
673
- DispatchQueue . main. asyncAfter ( deadline: . now( ) + 3 ) {
673
+ DispatchQueue . main. asyncAfter ( deadline: . now( ) + 0.1 ) {
674
674
completion ( AuthTests . authToken)
675
675
}
676
676
}
@@ -698,7 +698,7 @@ class AuthTests: XCTestCase {
698
698
} )
699
699
700
700
wait ( for: [ condition1] , timeout: testExpectationTimeout)
701
- wait ( for: [ condition2] , timeout: 3 )
701
+ wait ( for: [ condition2] , timeout: 1.0 )
702
702
}
703
703
704
704
func testAuthTokenNotRequestingForAlreadyExistingEmail( ) {
@@ -789,10 +789,8 @@ class AuthTests: XCTestCase {
789
789
)
790
790
api. userId = " some-user-id "
791
791
api. track ( " some-event " ) . onSuccess { _ in
792
- print ( " success " )
793
792
expectation2. fulfill ( )
794
793
} . onError { error in
795
- print ( " error, \( error) " )
796
794
XCTFail ( )
797
795
}
798
796
wait ( for: [ expectation1, expectation2] , timeout: testExpectationTimeout)
0 commit comments