From f8e72d3f9eb6397995f9da450d48d4f6e4c7de5d Mon Sep 17 00:00:00 2001 From: fi3ework Date: Tue, 25 Aug 2026 11:15:37 +0800 Subject: [PATCH] test(vscode): widen multiroot E2E diagnostic deadline for slow runners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'parent → child → parent' ownership-handoff test waits for the new owning folder's lint worker to cold-start and publish its first diagnostic. On GitHub's windows runners that cold start has exceeded upstream's 30s deadline (CI run 32718392387, attempt 1), failing the suite with 0 diagnostics after the handoff. Widen waitForSingleRslintDiagnostic's deadline to 60s and the suite timeout to 240s. Assertion semantics are unchanged; the deviations from the upstream-ported suite are documented inline per AGENTS.md. --- .../e2e/lint/suite-multiroot/multiroot.test.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/vscode/e2e/lint/suite-multiroot/multiroot.test.ts b/packages/vscode/e2e/lint/suite-multiroot/multiroot.test.ts index 5081de8..cef1ceb 100644 --- a/packages/vscode/e2e/lint/suite-multiroot/multiroot.test.ts +++ b/packages/vscode/e2e/lint/suite-multiroot/multiroot.test.ts @@ -1,5 +1,6 @@ -// Ported verbatim from web-infra-dev/rslint -// `packages/vscode-extension/__tests__/suite-multiroot/multiroot.test.ts` (origin/main). +// Ported from web-infra-dev/rslint +// `packages/vscode-extension/__tests__/suite-multiroot/multiroot.test.ts` (origin/main), +// with timing deviations documented inline (assertion semantics unchanged). import * as assert from 'node:assert'; import path from 'node:path'; import * as vscode from 'vscode'; @@ -31,7 +32,11 @@ function rslintDiagnostics(document: vscode.TextDocument): vscode.Diagnostic[] { async function waitForSingleRslintDiagnostic( document: vscode.TextDocument, ): Promise { - const deadline = Date.now() + 30_000; + // Deviation from upstream (30s): an ownership handoff spawns a fresh lint + // worker for the new owning folder, and that cold start has exceeded 30s on + // GitHub's windows runners (CI run 32718392387). The assertion semantics are + // unchanged — only the deadline is wider. + const deadline = Date.now() + 60_000; while (Date.now() < deadline) { const diagnostics = rslintDiagnostics(document); if ( @@ -63,7 +68,9 @@ async function waitForSingleRslintDiagnostic( } suite('VS Code multi-root ownership', function () { - this.timeout(60_000); + // Deviation from upstream (60s): the dynamic-ownership test below waits for + // up to three diagnostic publications, each with the widened 60s deadline. + this.timeout(240_000); test('keeps same-name roots independent', async function () { const appFolders = (vscode.workspace.workspaceFolders ?? []).filter(