-
Notifications
You must be signed in to change notification settings - Fork 427
@W-23054065: [iOS] Stabilize flaky REST API and auth tests #4068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
fcd6779
4c75337
ddb20a6
f9497e1
5cc4c30
c2712f4
08cfcfa
d831462
df311bc
a8ba8e2
1cc9c54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,7 +61,7 @@ class SFSDKAuthUtilTests: XCTestCase { | |
| endpointResponse = response | ||
| expectation.fulfill() | ||
| } | ||
| self.wait(for: [expectation], timeout: 30) | ||
| self.wait(for: [expectation], timeout: 60) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Timeout increase — same assertion, accommodates CI org load.
This response was generated by an AI agent on behalf of @JohnsonEricAtSalesforce. |
||
| let response = try XCTUnwrap(endpointResponse) | ||
| XCTAssertFalse(response.hasError) | ||
| XCTAssertNotNil(response.accessToken) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improvement — Auth resilience for class setUp.
CI runs showed that when the test org is briefly unreachable during
+setUp, ALL tests inSalesforceRestAPITestscascade-fail (50+ tests report "Setting up authentication failed"). This was the single most common failure pattern in overnight CI.This adds a 3-attempt retry with 3s backoff. After exhausting attempts, it still throws — the test suite still fails if auth is genuinely broken. The NSLog on each retry provides CI visibility into recovery frequency.
Same end-state assertion: auth must succeed or the suite aborts.
This response was generated by an AI agent on behalf of @JohnsonEricAtSalesforce.