Skip to content

Commit ea2a631

Browse files
committed
test(recording): the overlay budget leaves record stop a 20 s reserve inside its envelope
The check let the budget take all but a millisecond of the envelope; the recorder stop, the copies and the playability checks around the overlay need room beyond it.
1 parent 71650bb commit ea2a631

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/__tests__/command-descriptor-timeout-policy.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,14 @@ test('snapshot uses the standard daemon request timeout with an explicit overrid
337337

338338
test('the touch overlay budget leaves record stop room inside its request envelope', () => {
339339
// The recorder stop, the copies and the playability checks around the overlay are outside its
340-
// budget, so the budget alone must end before the client abandons the stop.
340+
// budget (about 1 s for a 10-minute simulator recording), so the envelope keeps a reserve for
341+
// them beyond it.
342+
const reserveMs = 20_000;
341343
const envelopeMs = resolveCommandRequestTimeoutMs(resolveCommandTimeoutPolicy('record'), {
342344
positionals: ['stop'],
343345
flags: {},
344346
});
345-
assert.ok(envelopeMs !== undefined && OVERLAY_BUDGET_MS < envelopeMs);
347+
assert.ok(envelopeMs !== undefined && OVERLAY_BUDGET_MS + reserveMs <= envelopeMs);
346348
});
347349

348350
test('open and prepare startup budgets keep a client-envelope margin over the daemon deadline', () => {

0 commit comments

Comments
 (0)