@@ -27,10 +27,7 @@ vi.mock('../screenshot-status-bar.ts', async (importOriginal) => {
2727import { ensureBootedSimulator } from '../simulator.ts' ;
2828import { captureSimulatorScreenshotWithFallback } from '../screenshot.ts' ;
2929import { SIMCTL_SCREENSHOT_TIMEOUT_REASON } from '../tool-provider.ts' ;
30- import {
31- IOS_SIMCTL_LIST_TIMEOUT_MS ,
32- IOS_SIMULATOR_SCREENSHOT_STATE_PROBE_TIMEOUT_MS ,
33- } from '../config.ts' ;
30+ import { IOS_SIMULATOR_SCREENSHOT_TIMEOUT_MS } from '../config.ts' ;
3431import {
3532 commandFailed ,
3633 commandStdout ,
@@ -238,20 +235,17 @@ test('a state read that itself fails keeps the capture failure and its diagnosti
238235 ) ;
239236} ) ;
240237
241- test ( 'the recovery probe is bounded by the screenshot ceiling, not the inventory budget' , async ( ) => {
238+ test ( 'the five-second recovery probe stays below the capture budget' , async ( ) => {
242239 const device = simulator ( 'sim-recover-budget' ) ;
243240 const probe = await probeRecovery ( device , { state : ( ) => listingFor ( device . id , 'Shutdown' ) } ) ;
244241
245242 const [ onlyProbe ] = probe . stateReads ;
246243 assert . ok ( onlyProbe , 'the recovery reads the boot state once' ) ;
247- assert . equal (
248- onlyProbe . options . timeoutMs ,
249- IOS_SIMULATOR_SCREENSHOT_STATE_PROBE_TIMEOUT_MS ,
250- 'the probe runs under the screenshot-owned ceiling' ,
251- ) ;
244+ const timeoutMs = onlyProbe . options . timeoutMs ;
245+ assert . equal ( timeoutMs , 5_000 , 'the probe uses the adopted five-second ceiling' ) ;
252246 assert . ok (
253- IOS_SIMULATOR_SCREENSHOT_STATE_PROBE_TIMEOUT_MS < IOS_SIMCTL_LIST_TIMEOUT_MS ,
254- 'the probe must not inherit the 60s inventory budget behind a 20s capture ' ,
247+ timeoutMs !== undefined && timeoutMs < IOS_SIMULATOR_SCREENSHOT_TIMEOUT_MS ,
248+ 'the recovery probe stays below the capture budget' ,
255249 ) ;
256250} ) ;
257251
0 commit comments