Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[expo-updates] E2E tests: graceful Detox failures #21520

Merged
merged 1 commit into from
Mar 4, 2023

Conversation

douglowder
Copy link
Contributor

Why

  • When updates E2E Detox tests fail on Android, the build hangs instead of immediately exiting gracefully.
  • Root cause: the set pipefail in the on-success hook causes the hook to immediately exit when Detox fails, without shutting down the emulator first.

How

  • Modify the on-success hook to detect the Detox exit code, shut down the emulator, and then return the Detox exit code so that failure is handled correctly
  • Added an optional LOCAL_TESTING environment variable that allows eas build ... --local to work correctly for debugging these files in future

Test Plan

  • Added a temporary commit that will cause the updates E2E workflow to fail -- they should fail and not have to be canceled
  • After removing the temporary commit, E2E should pass as usual

Checklist

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Mar 3, 2023
@douglowder douglowder force-pushed the doug/detox-fail-gracefully branch from 803101f to 820a449 Compare March 3, 2023 23:29
@douglowder douglowder force-pushed the doug/detox-fail-gracefully branch from 820a449 to 376c346 Compare March 3, 2023 23:55
@douglowder douglowder added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Mar 3, 2023
@expo expo deleted a comment from expo-bot Mar 3, 2023
@expo expo deleted a comment from expo-bot Mar 3, 2023
@douglowder douglowder marked this pull request as ready for review March 3, 2023 23:57
@douglowder douglowder requested a review from wschurman as a code owner March 3, 2023 23:57
@douglowder douglowder requested review from tsapeta and dsokal March 3, 2023 23:58
@douglowder douglowder merged commit 4727397 into main Mar 4, 2023
@douglowder douglowder deleted the doug/detox-fail-gracefully branch March 4, 2023 00:57
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants