MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / recycleFixtureLaunchAndRetry

Function recycleFixtureLaunchAndRetry

scripts/integration/cli.mjs:1005–1019  ·  view source on GitHub ↗
(label, options = {})

Source from the content-addressed store, hash-verified

1003}
1004
1005async function recycleFixtureLaunchAndRetry(label, options = {}) {
1006 const recoveryCount = options.recoveryCount ?? 0;
1007 const nextRecoveryCount = recoveryCount + 1;
1008 logStep(
1009 `${label}: recycling simulator after ${options.reason ?? "simulator app activation timeout"}`,
1010 );
1011 await restartSimulatorForFixtureLaunch(label);
1012 return ensureFixtureForeground(label, {
1013 ...options,
1014 recoveryCount: nextRecoveryCount,
1015 launchAttempts: Math.max(options.launchAttempts ?? 1, 2),
1016 verifyAttempts: Math.max(options.verifyAttempts ?? 8, 10),
1017 waitTimeoutMs: Math.max(options.waitTimeoutMs ?? 5_000, 10_000),
1018 });
1019}
1020
1021async function restartSimulatorForFixtureLaunch(label) {
1022 await measuredStep(

Callers 1

ensureFixtureForegroundFunction · 0.85

Calls 4

logStepFunction · 0.85
ensureFixtureForegroundFunction · 0.85
maxMethod · 0.80

Tested by

no test coverage detected