Skip to content

Commit d399d93

Browse files
committed
test(ios): boot ios Simulator w/retries, more time per test and global
1 parent 3da8ac5 commit d399d93

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.github/workflows/scripts/boot-simulator.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ pushd "$(dirname "$0")/../../../tests" || exit 1
88
SIM="$(cat .detoxrc.js | grep iPhone | cut -d"'" -f2)"
99
echo "Attempting to boot iOS Simulator $SIM..."
1010

11+
# Clear up any existing attempts in case we are re-trying
12+
killall Simulator || true
13+
1114
# Boot the simulator if not booted, make sure it is in the foreground
1215
(xcrun simctl boot "$SIM" || true) && open -a Simulator.app
1316

.github/workflows/tests_e2e_ios.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
runs-on: macos-26
9090
needs: matrix_prep
9191
# TODO matrix across APIs, at least 11 and 15 (lowest to highest)
92-
timeout-minutes: 60
92+
timeout-minutes: 70
9393
env:
9494
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
9595
CCACHE_SLOPPINESS: clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros
@@ -287,7 +287,12 @@ jobs:
287287
- name: Pre-Boot Simulator
288288
# The goal here is to separate Simulator boot from Detox run,
289289
# So that Simulator boot issues we seem to have may be handled separately
290-
run: ./.github/workflows/scripts/boot-simulator.sh
290+
uses: nick-fields/retry@v3
291+
with:
292+
timeout_minutes: 5
293+
retry_wait_seconds: 60
294+
max_attempts: 3
295+
command: ./.github/workflows/scripts/boot-simulator.sh
291296

292297
- name: Detox Test
293298
if: contains(matrix.buildmode, 'debug')

tests/.jetrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
config: {
77
slow: 3000,
88
reporter: 'spec',
9-
timeout: 300000, // 5 minutes
9+
timeout: 420000, // 7 minutes - fetchAndActivate takes 5+ sometimes
1010
exitOnError: true,
1111
coverage: true,
1212
},

tests/e2e/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
module.exports = {
33
rootDir: '..',
44
testMatch: ['<rootDir>/e2e/**/*.test.js'],
5-
testTimeout: 1500000,
5+
testTimeout: 2000000,
66
maxWorkers: 1,
77
globalSetup: 'detox/runners/jest/globalSetup',
88
globalTeardown: 'detox/runners/jest/globalTeardown',

0 commit comments

Comments
 (0)