(label, options = {})
| 1003 | } |
| 1004 | |
| 1005 | async 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 | |
| 1021 | async function restartSimulatorForFixtureLaunch(label) { |
| 1022 | await measuredStep( |
no test coverage detected