Skip to content

Commit 40bcf0e

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Do not kill emulators when testing (facebook#47030)
Summary: Pull Request resolved: facebook#47030 Looking at the videos from the E2E tests, it seems that the tests are pretty reliable aside from the first one that often fail. And it looks like it is failing not because the test is wrong, but because maestro hits some sort of timeout and kills the test sooner. With these changes we are: - giving more time to maestro to run - not killing the emulator anymore Killing and restarting the simulator was making this problem workse, because a newly started simulator required more time to boots and to work properly ## Changelog: [Internal] - stop killing simulators and increase timeouts Reviewed By: cortinico Differential Revision: D64398111 fbshipit-source-id: 17b107fee24d0fbd4897212c1907be3761e337ab
1 parent 8cf27e8 commit 40bcf0e

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

.github/actions/maestro-ios/action.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,18 @@ runs:
7171
7272
if [[ ${{ inputs.flavor }} == 'Debug' ]]; then
7373
# To give the app time to warm the metro's cache
74-
sleep 5
74+
sleep 20
7575
fi
7676
7777
echo "Running tests with Maestro"
78-
export MAESTRO_DRIVER_STARTUP_TIMEOUT=1200000 # 20 min. CI is extremely slow
78+
export MAESTRO_DRIVER_STARTUP_TIMEOUT=1500000 # 25 min. CI is extremely slow
7979
8080
# Add retries for flakyness
8181
MAX_ATTEMPTS=5
8282
CURR_ATTEMPT=0
8383
RESULT=1
8484
8585
while [[ $CURR_ATTEMPT -lt $MAX_ATTEMPTS ]] && [[ $RESULT -ne 0 ]]; do
86-
if [[ $CURR_ATTEMPT -ne 0 ]]; then
87-
echo "Rebooting simulator for stability"
88-
xcrun simctl boot "iPhone 15 Pro"
89-
fi
90-
9186
CURR_ATTEMPT=$((CURR_ATTEMPT+1))
9287
echo "Attempt number $CURR_ATTEMPT"
9388
@@ -103,9 +98,6 @@ runs:
10398
10499
# Stop video
105100
kill -SIGINT $(cat video_record_${{ inputs.jsengine }}_$CURR_ATTEMPT.pid)
106-
107-
echo "Shutting down simulator for stability"
108-
xcrun simctl shutdown "iPhone 15 Pro"
109101
done
110102
111103
exit $RESULT

0 commit comments

Comments
 (0)