Detox: iOS Detox tests fail in Github actions CI with multiple workers - Exceeded timeout of 300000ms while handling jest-circus "setup" event
What happened?
First reported with a comment on a separate issue: https://github.com/wix/Detox/issues/3342#issuecomment-1228850607
Running tests for iOS with 3 workers using the detox cli --workers
leads to intermittent test failures. It seems to have something to do with the instantiation of new simulators to support the concurrent workers. When running only 1 worker, I am unable to reproduce this issue.
CI: Github Actions
As a workaround, I have created a simple test suite consisting of only 3 tests. These tests run with 3 workers so that Detox will create new simulator instances for them. This 3 tests usually fail with the timeout issue, however, when the actual test suite runs immediately after, it does not encounter the timeout issue. This leads me to believe that if the simulators have already been created, Detox bypasses this step, and bypasses the bug altogether.
Attached are the logs with trace
logging enabled from when the errors occurred.
The command to run this step is as follows
- name: Initialize Detox Tests
id: detox-init
continue-on-error: true
run: yarn detox test --use-custom-logger false --loglevel warn --configuration ios.sim.gha --cleanup --workers 3 --runner-config e2e/InitCITests/config.json --keepLockFile true
What was the expected behaviour?
The jest-circus setup step would not timeout.
Was it tested on latest Detox?
- I have tested this issue on the latest Detox release and it still reproduces.
Did your test throw out a timeout?
- I have followed the instructions under Identifying which synchronization mechanism causes us to wait too much.
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: 19.10.0 React Native version: 0.67.2 Node version: 14.18.1 Device model: iPhone 13 iOS version: 14.5 macOS version: 12 Xcode version: 13.4.1 Test-runner (select one): jest-circus
Detox logs
Detox logs
Device logs
Device logs
paste logs here!
More data, please!
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 22 (4 by maintainers)
Can we reopen this @d4vidi ?
@sergtimosh
Sorry, I mean I was never able to solve this problem without the workaround.
@sergtimosh
It is just a pretty standard config file
The test regex was targeting 3 test files called
worker1.initci.ts
,worker2.initci.ts
, andworker3.initci.ts
. Each of these have a bare bones test in themI am no longer working on the codebase where I had this problem, but I was never able to solve it.
This is still a problem
I’m having this issue on GH Actions after updating the runner from macos-11 to macos-12.
It seems the simulator doesn’t boot fast enough since its the first use of it. I have maxWorkers at 1. bootstatus is run but doesn’t seem to report anything and eventually the timeout is fired and the tests don’t get assigned to a simulator: