Skip to content

Commit d30a101

Browse files
DavertMikclaude
andcommitted
fix(appium): raise connectionRetryTimeout to 5min, enable test retries
The Sauce Labs Android emulator cold-start regularly exceeds webdriverio's 2-minute connectionRetryTimeout default, producing UND_ERR_HEADERS_TIMEOUT on `POST /wd/hub/session` and failing the suite before any test runs. Bump the default for the Appium helper to 5 minutes (mobile cloud grids are slow by nature). Also re-enable Mocha's `this.retries(1)` in the Appium test suite — already attempted but commented out — so a single transient Sauce Labs hiccup no longer reds the whole job. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent fb0d87e commit d30a101

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

lib/helper/Appium.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ class Appium extends Webdriver {
220220
deprecationWarnings: false,
221221
restart: true,
222222
manualStart: false,
223+
// Mobile emulator/device cold starts (esp. on cloud grids like Sauce Labs)
224+
// routinely exceed webdriverio's 2-minute default. Bump to 5 min.
225+
connectionRetryTimeout: 300000, // ms
223226
timeouts: {
224227
script: 0, // ms
225228
},

test/helper/Appium_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const apk_path = 'storage:filename=selendroid-test-app-0.17.0.apk'
2121
const smallWait = 3
2222

2323
describe('Appium', function () {
24-
// this.retries(1);
24+
this.retries(1)
2525
this.timeout(0)
2626

2727
before(async () => {

0 commit comments

Comments
 (0)