fix(ios-tests): reduce testCleanResyncGhosts flakiness#479
Merged
wmathurin merged 1 commit intoJul 7, 2026
Merged
Conversation
- Parallelize the two independent netCreate calls to save one RTT
- Add 1s pause after netDel before cleanResyncGhosts to allow deletion
to propagate on the server (mirrors the pattern in testReSync)
- Add .catch() so transient errors fail fast with a message instead of
hanging for the full 120s XCUITest timeout
- Fix wrong assertion message ('should be 1' → 'should be 2')
bbirman
approved these changes
Jul 7, 2026
|
||||||||||||||
|
||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
netCreatecalls — the two contacts are independent; running them withPromise.allsaves one full server RTT off the critical pathnetDelbeforecleanResyncGhosts— Salesforce has eventual consistency; the deletion needs a moment to propagate before the ghost-detection query runs (mirrors the existing pattern intestReSync).catch()handler — without it, any transient network error causes the test to hang silently for the full 120s XCUITest timeout instead of failing immediately with a useful message'Total size should be 1'→'Total size should be 2'Context
testCleanResyncGhostshas been the sole flapping test in the iOS suite for a while. It timed out in CI on both the^18and^26legs of PR #477. The test makes 6+ sequential network calls to a live Salesforce org; on a slow CI runner that easily lands on or past the 120s XCUITest timeout. The parallel creates address the root timing cause; the.catch()ensures that if it does time out in future, the failure is reported immediately with a message rather than as an opaque hang.Test plan
iosTestslocally:xcodebuild test -workspace SalesforceReactTestApp.xcworkspace -scheme SalesforceReactTestApp -destination 'platform=iOS Simulator,name=iPhone 16 Pro'testCleanResyncGhostspasses and completes faster than before