Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions packages/vscode/e2e/lint/suite/registry-harness.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ suite('VS Code test harness fail-closed guards', function () {
{
consecutiveSuccessfulWindows: 2,
timeoutMs: 1_000,
retryDelayMs: 0,
// Deviation from upstream (0): a positive delay so the delayed-retry
// branch is exercised here, with a budget that a stalled runner cannot
// exhaust across three 5ms waits.
retryDelayMs: 5,
description: 'the injected readiness sequence',
},
);
Expand All @@ -33,23 +36,19 @@ suite('VS Code test harness fail-closed guards', function () {
});

test('continuous interruption times out instead of passing partially', async () => {
let attempts = 0;
await assert.rejects(
waitForConsecutiveSuccessfulProbeWindows(
async () => {
attempts += 1;
return false;
},
{
consecutiveSuccessfulWindows: 2,
timeoutMs: 50,
retryDelayMs: 5,
description: 'the continuously interrupted injected probe',
},
),
waitForConsecutiveSuccessfulProbeWindows(async () => false, {
consecutiveSuccessfulWindows: 2,
timeoutMs: 50,
retryDelayMs: 5,
description: 'the continuously interrupted injected probe',
}),
/Timed out.*interruptedWindows=/,
);
assert.ok(attempts > 1, 'The probe should retry readiness windows');
// Deviation from upstream: no `attempts > 1` assertion. Retrying is
Comment thread
fi3ework marked this conversation as resolved.
// already proven by the interrupted-window test above, and this suite runs
// inside the extension host during activation, where one stalled 5ms retry
// delay can outlast the 50ms budget and leave a correct loop at attempts=1.
});

test('a non-settling probe window is bounded by the hard deadline', async () => {
Expand Down
Loading