Skip to content

Commit 7f9d148

Browse files
committed
fix(aws): the allocation deadline bounds remote-access startup, not the 120s default
Live iOS real-device run: startup needed ~128s and hit the standalone 120s default while the daemon's 300s allocation budget still had room — the new ownership guard correctly stopped the ARN, but the open failed for no reason. When the daemon supplies a deadline it is the bound; the default only applies standalone. Rerun: open in 112s, snapshot, clean close, session STOPPING.
1 parent dd20855 commit 7f9d148

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎packages/provider-webdriver/src/aws-device-farm.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,12 @@ async function waitForRunningRemoteAccessSession(
292292
},
293293
req: LeaseLifecycleContext | undefined,
294294
): Promise<AwsDeviceFarmRemoteAccessSession> {
295-
const timeoutMs = options.startupTimeoutMs ?? 120_000;
296295
const pollIntervalMs = options.pollIntervalMs ?? 5_000;
297296
const startedAt = Date.now();
298-
const deadline = Math.min(startedAt + timeoutMs, req?.deadline ?? Infinity);
297+
// The daemon's allocation deadline is the bound when present (real-device
298+
// startup routinely needs the whole ~2 min); the standalone default only
299+
// applies when no allocation budget was supplied.
300+
const deadline = req?.deadline ?? startedAt + (options.startupTimeoutMs ?? 120_000);
299301
const signal = req?.signal;
300302
let last = await options.client.getRemoteAccessSession(arn);
301303
while (Date.now() < deadline) {

0 commit comments

Comments
 (0)