From 7f980f85aa2ddfb5831e10860dbb6bf312b9c035 Mon Sep 17 00:00:00 2001 From: Ben King <9087625+benfdking@users.noreply.github.com> Date: Mon, 7 Jul 2025 15:53:52 +0100 Subject: [PATCH] chore: removing timeouts as tests are fast enough now --- vscode/extension/tests/bad_setup.spec.ts | 6 ++---- vscode/extension/tests/python_env.spec.ts | 18 +++--------------- vscode/extension/tests/tcloud.spec.ts | 9 +++------ vscode/extension/tests/venv_naming.spec.ts | 3 +-- 4 files changed, 9 insertions(+), 27 deletions(-) diff --git a/vscode/extension/tests/bad_setup.spec.ts b/vscode/extension/tests/bad_setup.spec.ts index 4d716ce166..db3d481341 100644 --- a/vscode/extension/tests/bad_setup.spec.ts +++ b/vscode/extension/tests/bad_setup.spec.ts @@ -14,8 +14,7 @@ import { test('missing LSP dependencies shows install prompt', async ({ page, sharedCodeServer, -}, testInfo) => { - testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation +}) => { const tempDir = await fs.mkdtemp( path.join(os.tmpdir(), 'vscode-test-tcloud-'), ) @@ -111,8 +110,7 @@ test('lineage, no sqlmesh found', async ({ test.skip('check that the LSP runs correctly by opening lineage when looking at another file before not in workspace', async ({ page, sharedCodeServer, -}, testInfo) => { - testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation +}) => { const tempDir = await fs.mkdtemp( path.join(os.tmpdir(), 'vscode-test-tcloud-'), ) diff --git a/vscode/extension/tests/python_env.spec.ts b/vscode/extension/tests/python_env.spec.ts index d0d8e0134d..bd5dfff3a3 100644 --- a/vscode/extension/tests/python_env.spec.ts +++ b/vscode/extension/tests/python_env.spec.ts @@ -71,12 +71,7 @@ async function setupEnvironment(): Promise<{ } test.describe('python environment variable injection on sqlmesh_lsp', () => { - test('normal setup - error ', async ({ - page, - sharedCodeServer, - }, testInfo) => { - testInfo.setTimeout(120_000) - + test('normal setup - error ', async ({ page, sharedCodeServer }) => { const { tempDir } = await setupEnvironment() writeEnvironmentConfig(tempDir) await runTest(page, sharedCodeServer, tempDir) @@ -120,12 +115,7 @@ async function setupTcloudProject( } test.describe('tcloud version', () => { - test('normal setup - error ', async ({ - page, - sharedCodeServer, - }, testInfo) => { - testInfo.setTimeout(120_000) - + test('normal setup - error ', async ({ page, sharedCodeServer }) => { const { tempDir, pythonDetails } = await setupEnvironment() await setupTcloudProject(tempDir, pythonDetails) writeEnvironmentConfig(tempDir) @@ -133,9 +123,7 @@ test.describe('tcloud version', () => { await page.waitForSelector('text=Error creating context') }) - test('normal setup - set', async ({ page, sharedCodeServer }, testInfo) => { - testInfo.setTimeout(120_000) - + test('normal setup - set', async ({ page, sharedCodeServer }) => { const { tempDir, pythonDetails } = await setupEnvironment() await setupTcloudProject(tempDir, pythonDetails) writeEnvironmentConfig(tempDir) diff --git a/vscode/extension/tests/tcloud.spec.ts b/vscode/extension/tests/tcloud.spec.ts index c38e61caa8..b677acaa27 100644 --- a/vscode/extension/tests/tcloud.spec.ts +++ b/vscode/extension/tests/tcloud.spec.ts @@ -38,8 +38,7 @@ async function setupPythonEnvironment(envDir: string): Promise { return pythonDetails.pythonPath } -test('not signed in, shows sign in window', async ({ page }, testInfo) => { - testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation +test('not signed in, shows sign in window', async ({ page }) => { const tempDir = await fs.mkdtemp( path.join(os.tmpdir(), 'vscode-test-tcloud-'), ) @@ -189,8 +188,7 @@ test('signed in and not installed shows installation window', async ({ test('tcloud sqlmesh_lsp command starts the sqlmesh_lsp in old version when ready', async ({ page, -}, testInfo) => { - testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation +}) => { const tempDir = await fs.mkdtemp( path.join(os.tmpdir(), 'vscode-test-tcloud-'), ) @@ -351,8 +349,7 @@ test('tcloud sqlmesh_lsp command starts the sqlmesh_lsp in new version when read // but the test is still useful when running it manually. test.skip('tcloud not signed in and not installed, shows sign in window and then fact that loaded', async ({ page, -}, testInfo) => { - testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation +}) => { const tempDir = await fs.mkdtemp( path.join(os.tmpdir(), 'vscode-test-tcloud-'), ) diff --git a/vscode/extension/tests/venv_naming.spec.ts b/vscode/extension/tests/venv_naming.spec.ts index 997317672a..4aeab2dcca 100644 --- a/vscode/extension/tests/venv_naming.spec.ts +++ b/vscode/extension/tests/venv_naming.spec.ts @@ -10,8 +10,7 @@ import { SUSHI_SOURCE_PATH, } from './utils' -test('venv being named .env', async ({ page, sharedCodeServer }, testInfo) => { - testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation +test('venv being named .env', async ({ page, sharedCodeServer }) => { const tempDir = await fs.mkdtemp( path.join(os.tmpdir(), 'vscode-test-tcloud-'), )