Repository navigation
ci(ios): fix the flaky Detox e2e tests - #4422
Merged
Merged
Conversation
- Don't block device.launchApp on Detox's logging hint, whose simctl get_app_container call can stall for minutes on loaded runners. - Load the Map Loaded example from a local style, so its test doesn't depend on the connection to api.mapbox.com. - Don't let Detox wait for Mapbox requests, and hide LogBox toasts that cover the example list. - Retry the map tap when a main-thread stall turns it into a long press.
This branch was previously deployed
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.
Description
Fixes the iOS Detox e2e flakes (about 5% of iOS jobs; every retry passed). Root causes, from the CI logs and #4418 diagnostics, each reproduced locally:
beforeAlltimeout (docs(example): add snackSupported example metadata #4416 run): aftersimctl launch, Detox awaits asimctl get_app_containercall that is only used to print a log hint. On CI that call stalled for 2 m 04 s, although the app had already connected. Fix: a yarn patch so Detox doesn't await the hint.api.mapbox.comstyle requests timed out for over 2 minutes; other runs had 7–8 s TLS connects. Detox also waited on the hung request, and the resulting LogBox toasts covered "Show Map", so the next test failed too. Fixes:styleJSON, so the test checks the map, not the network;*.mapbox.comrequests (setURLBlacklist);e2eIgnoreAllLogs.I left the timeouts unchanged.
Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)Component to reproduce the issue you're fixing
These are test-only provocations, kept out of the PR. Each was run locally on the
ios.debug.cibuild andfirstTest.e2e.js:NODE_OPTIONS=--require slow-simctl.js: delays the post-launchget_app_containerby 150 smapbox://styles/*to the black-hole IP 192.0.2.1longPress(2000)), like the stalled touch-up