From faada4d8ee11394dfa6f6ba21ab48731fb4b8435 Mon Sep 17 00:00:00 2001 From: Sysix <3897725+Sysix@users.noreply.github.com> Date: Mon, 20 Oct 2025 08:40:24 +0000 Subject: [PATCH] test(editor): reduce sleep time (#14749) ~~just looking if we can decrease the sleep timer~~ Looks stable --- editors/vscode/tests/e2e_server.spec.ts | 2 ++ editors/vscode/tests/test-helpers.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/editors/vscode/tests/e2e_server.spec.ts b/editors/vscode/tests/e2e_server.spec.ts index 7e0515b22516b..357e8b71a347d 100644 --- a/editors/vscode/tests/e2e_server.spec.ts +++ b/editors/vscode/tests/e2e_server.spec.ts @@ -74,6 +74,7 @@ suite('E2E Diagnostics', () => { testSingleFolderMode('detects diagnostics on run', async () => { await loadFixture('lint_on_run'); + await sleep(250); const diagnostics = await getDiagnosticsWithoutClose(`onType.ts`); strictEqual(diagnostics.length, 0); @@ -91,6 +92,7 @@ suite('E2E Diagnostics', () => { test('empty oxlint configuration behaves like default configuration', async () => { await loadFixture('debugger_empty_config'); + await sleep(250); const diagnostics = await getDiagnostics('debugger.js'); strictEqual(diagnostics.length, 1); diff --git a/editors/vscode/tests/test-helpers.ts b/editors/vscode/tests/test-helpers.ts index ad1de5972a8c1..bbd6f38088c14 100644 --- a/editors/vscode/tests/test-helpers.ts +++ b/editors/vscode/tests/test-helpers.ts @@ -70,7 +70,7 @@ export async function activateExtension(full: boolean = true): Promise { const fileUri = Uri.joinPath(fixturesWorkspaceUri(), 'fixtures', 'debugger.js'); await window.showTextDocument(fileUri); // wait for initialized requests - await sleep(500); + await sleep(250); await commands.executeCommand('workbench.action.closeActiveEditor'); } } @@ -109,7 +109,7 @@ export async function getDiagnostics(file: string, workspaceDir: Uri = fixturesW export async function getDiagnosticsWithoutClose(file: string, workspaceDir: Uri = fixturesWorkspaceUri()): Promise { const fileUri = Uri.joinPath(workspaceDir, 'fixtures', file); await window.showTextDocument(fileUri); - await sleep(500); + await sleep(250); const diagnostics = languages.getDiagnostics(fileUri); return diagnostics; }