Comparing version
{ | ||
"name": "detox", | ||
"description": "E2E tests and automation for mobile", | ||
"version": "20.32.0", | ||
"version": "20.32.1-smoke.0", | ||
"bin": { | ||
@@ -122,3 +122,3 @@ "detox": "local-cli/cli.js" | ||
], | ||
"gitHead": "32bc3aabb05f843e8307043e9e5c85f4b47accef" | ||
"gitHead": "19976e73e8f1c9d2c2bf901bccaa32be8551aed7" | ||
} |
@@ -11,3 +11,9 @@ // @ts-nocheck | ||
const INSTALL_TIMEOUT = 45000; | ||
const DEFAULT_EXEC_OPTIONS = { | ||
retries: 1, | ||
}; | ||
const DEFAULT_INSTALL_OPTIONS = { | ||
timeout: 60000, | ||
retries: 3, | ||
}; | ||
@@ -17,2 +23,4 @@ class ADB { | ||
this._cachedApiLevels = new Map(); | ||
this.defaultExecOptions = DEFAULT_EXEC_OPTIONS; | ||
this.installOptions = DEFAULT_INSTALL_OPTIONS; | ||
this.adbBin = getAdbPath(); | ||
@@ -118,3 +126,3 @@ } | ||
: `install -rg ${apkPath}`; | ||
const result = await this.adbCmdSpawned(deviceId, command, { timeout: INSTALL_TIMEOUT, retries: 3 }); | ||
const result = await this.adbCmdSpawned(deviceId, command, this.installOptions); | ||
@@ -135,3 +143,3 @@ const [failure] = (result.stdout || '').match(/^Failure \[.*\]$/m) || []; | ||
: `pm install -rg ${path}`; | ||
return this.shellSpawned(deviceId, command, { timeout: INSTALL_TIMEOUT, retries: 3 }); | ||
return this.shellSpawned(deviceId, command, this.installOptions); | ||
} | ||
@@ -360,3 +368,3 @@ | ||
const _options = { | ||
retries: 1, | ||
...this.defaultExecOptions, | ||
...options, | ||
@@ -372,2 +380,3 @@ }; | ||
const _spawnOptions = { | ||
...this.defaultExecOptions, | ||
...spawnOptions, | ||
@@ -374,0 +383,0 @@ capture: ['stdout'], |
@@ -22,2 +22,8 @@ // @ts-nocheck | ||
// Make ADB more resilient to network latency and connection hiccups | ||
this.adb.defaultExecOptions = { | ||
retries: 5, | ||
interval: 3000, | ||
backoff: 'linear', | ||
}; | ||
this._instanceName = name; | ||
@@ -24,0 +30,0 @@ } |
@@ -29,2 +29,3 @@ // @ts-nocheck | ||
interval = 100, | ||
backoff = 'none', | ||
...spawnOptions | ||
@@ -34,3 +35,3 @@ } = _options; | ||
let result; | ||
await retry({ retries, interval }, async (tryCount, lastError) => { | ||
await retry({ retries, interval, backoff }, async (tryCount, lastError) => { | ||
_logSpawnRetrying(logger, tryCount, lastError); | ||
@@ -37,0 +38,0 @@ result = await _spawnAndLog(logger, binary, flags, command, spawnOptions, tryCount); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
28588
0.06%14824518
01
Infinity%